Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

append vector to itself c++

auto old_count = xx.size();
xx.resize(2 * old_count);
std::copy_n(xx.begin(), old_count, xx.begin() + old_count);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #append #vector
ADD COMMENT
Topic
Name
2+4 =