cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
adding vectors
adding vectors
Jun 30, 2010 at 6:11pm UTC
ischuldt
(57)
I have two vectors and I want to add the second vector on to the end of the first vector.
Is that as simple as saying vector1 + vector2 or vector1 << vector2?
Jun 30, 2010 at 6:14pm UTC
moorecm
(1932)
vector1.insert( vector1.end(), vector2.begin(), vector2.end() );
See:
http://www.cplusplus.com/reference/stl/vector/insert/
Topic archived. No new replies allowed.