kechap
kechap

Reputation: 2087

Nested stl lists

I want to make an array of lists that contain a list.

For example something like this

list<list<int>> L[5];

Obviously this code doesn't work in all compilers.

Which is the best way to create this kind of struct cause i think i am thinking wrong here.

Upvotes: 0

Views: 1374

Answers (1)

unkulunkulu
unkulunkulu

Reputation: 11922

This code should work and it's a possible approach to you task.

One guess is that >> should have a space in between for some compilers.

Like this:

list<list<int> > L[5];

Upvotes: 2

Related Questions