Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

C++ Vector/container question

  • 05-04-2007 06:02PM
    #1
    Registered Users, Registered Users 2 Posts: 143 ✭✭


    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


Comments

  • Registered Users, Registered Users 2 Posts: 1,481 ✭✭✭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.


Advertisement