Hi all,
I have a vector of vector of ints, I could use C approach by using
int[][] but I think C++ vector<vector<int> > would be easier to manage.
So I have a function which creates and initializes the vector with the
values I need (I know these values before hand).
- What's the best way to initialize the vector<vector<int> >? Can I
initilize it by enumerating its values?
- If I do: v = new vector<vector<int> >(3) for example, is it
initializing the internal vector automatically?
- Is returning a vector from a function too heavy from an efficiency
perspective?
Or it would be better to return always a pointer to a vector?
Cheers,
Paulo Matos