By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,583 Members | 1,076 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,583 IT Pros & Developers. It's quick & easy.

push_back a vector in a vector without temporary vectors

P: 1

i am trying to use the push_back() function to push a vector in an other vector
i created this vector:

Expand|Select|Wrap|Line Numbers
  1. std::vector < std::vector < char > > map;
how can i push in more vectors? ( without creating any temporary vectors / variables)

hope you can help :)


i found it!

Expand|Select|Wrap|Line Numbers
  1. map.push_back( std::vector < char > { '#' } );
this worked.
Dec 31 '19 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.