coping 2d vector in cpp

C++
If y is already created, use
y = v;auto y(v);
Source

Also in C++: