How to assign 2D vectors
1 2
|
double arr[][] = {{1,2},{3,4},{5,6}}
std::vector< std::vector<double> > my_vector;
| |
How can I use the vector "
assign()" function to copy the values of array
arr to
my_vector?
Oh no.. but we could do it for 1D arrays :(
1 2
|
int myints[] = {1776,7,4};
third.assign (myints,myints+3); // assigning from array.
| |
Right... but 1D arrays are simpler.
Topic archived. No new replies allowed.