How to assign vector values to array values? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 6

How to assign vector values to array values?

Suppose i want to create a vector that has size of 12 elements and i want to assign as the values from an array of 12 elements of integer, how to implement in c or c++?

16th Apr 2019, 9:00 AM
Zhenis Otarbay
Zhenis Otarbay - avatar
1 Answer
+ 4
vector<int> myVec(arrayName, arrayName+12)
16th Apr 2019, 9:04 AM
Elva
Elva - avatar