J
JustSomeGuy
I have a few classes...
class a : std::list<baseclass>
{
int keya;
};
class b : std::list<a>
{
int keyb;
};
class c : std::list<b>
{
int keyc;
};
I'm trying to figure out at each level the size of the lists...
so if I have:
int main(int argc, char *argv[])
{
c x;
cout << "The size of the c class list is " << x.size() << endl;
cout << "The size of the b class list is " << ???? << endl;
cout << "The size of the a class list is " << ???? <<< endl;
}
-------------------------------------------------------------------------
Thinking about it...
Using inheritance of std::list may not have been the best idea..
perhaps:
class a : std::list<baseclass>
{
int keya;
std::list<sometype> baseclasslist;
};
class b
{
int keyb;
std::list<a> alist;
};
class c
{
int keyc;
std::list<b> blist;
};
May have been a better implementation, but the question remains.
class a : std::list<baseclass>
{
int keya;
};
class b : std::list<a>
{
int keyb;
};
class c : std::list<b>
{
int keyc;
};
I'm trying to figure out at each level the size of the lists...
so if I have:
int main(int argc, char *argv[])
{
c x;
cout << "The size of the c class list is " << x.size() << endl;
cout << "The size of the b class list is " << ???? << endl;
cout << "The size of the a class list is " << ???? <<< endl;
}
-------------------------------------------------------------------------
Thinking about it...
Using inheritance of std::list may not have been the best idea..
perhaps:
class a : std::list<baseclass>
{
int keya;
std::list<sometype> baseclasslist;
};
class b
{
int keyb;
std::list<a> alist;
};
class c
{
int keyc;
std::list<b> blist;
};
May have been a better implementation, but the question remains.