Discussions
Categories
Groups
Advertisement
Child Item
Home
Topics
Technology & Internet
Software & Web Development
Development
C++ Vector/container question
Lars
Hi,
I'm not very good at C++ and I'm trying to figure out how to create a container of vectors. A vector where each item that it hold is also a vector would be perfect? Any suggestions?
Thanks
L
Find more posts tagged with
Quick Links
All Categories
Recent Posts
Activity
Unanswered
Groups
Best Of
Advertisement
Advertisement
Comments
satchmo
No reason you can't do that...
vector<vector<int> > vecVecInt;
The space after the <int> is important, because if you leave it out the compiler will try to interpret >> as a symbol, and hilarity will surely ensue.