In article <3F***************@home.with.yourself>,
s <yo*********@home.with.yourself> wrote:
Can I have a STL list of lists?
Yep. The STL containers can store any data type, and other containers
are (at least for this purpose) no different from any other data type.
A few typedefs might make the resulting code easier to follow:
typedef std::list<mydata> my_data_list;
void foo(std::list<my_data_list> list_of_lists)
{
/*Do stuff with each list contained list_of_lists*/
}
(For more fun, you can also have, f'rexample, sets of maps of vectors.
typedef gets a *lot* more useful there.)
dave
--
Dave Vandervies
dj******@csclub.uwaterloo.ca
I once took on the peculiar task of going through about two and a half
million lines of C written by folks who thought of themselves as experts
(and were sometimes right). --Eric Sosman in comp.lang.c