I have a vector < vector < Point> > X
and want to copy all the elements in it into a vector < Point > Y
(and in the same order if is possible)
I tried something like (in a for cycle):
Y.push_back(i) = X.at(i).at(i);
but obviously it doesn't work...
I also find this (on stackoverflow) but it doesn't work for me as well...
for (std::vector<std::vector<Point> >::iterator it = X.begin(), itEnd = X.end(); it != itEnd; ++it)
Y.push_back((*it));
but the compiler tells me that "there isn't an instance of function in overload" (and honestly I don't even know what does it mean).