C
Chris Roth
vector<double> v1(5,1);
vector<double> v2;
v2 = v1; // 1
v2.assign(v1.begin(),v1.end()); // 2
Are 1 and 2 the same, or are their subtle differences between them.
Which is preferable, if either? And yes, I know I could use the
construction vector<double> v2(v1), but I'm giving an example above.
Thank you c++ users.
vector<double> v2;
v2 = v1; // 1
v2.assign(v1.begin(),v1.end()); // 2
Are 1 and 2 the same, or are their subtle differences between them.
Which is preferable, if either? And yes, I know I could use the
construction vector<double> v2(v1), but I'm giving an example above.
Thank you c++ users.