Question is about what is the best way to create vector of vectors. I have several vector<double> coordinates; and I want pass them to function. How I should combine them, vector<vector<double> >? Is there more elegant way?
Question is about what is the best way to create vector of vector s.
Share
That sounds like a reasonable approach. If you’re worried about readability, then use a
typedef.However, if all of your vectors are the same length (e.g. you’re really trying to create a 2D array), then consider using a
boost::multi_array.