T
T
Tolik2014-06-16 20:23:43
C++ / C#
Tolik, 2014-06-16 20:23:43

How to assign the value of another to one vector in C++?

But not at creation. Both vectors are already created and have some elements. I know that you can clear through vector.clear();Tried through vector1.assign(vector2);and does not work

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
lookid, 2014-06-16
@Diel

en.cppreference.com/w/cpp/container/vector
v1 = v2
doesn't work?

R
Razzle, 2014-06-16
@Razzle

Equate them?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question