I have a vector object:
std::vector<std::vector<MyClass>> _matrix;
It is 2d array with some data. When i trying to resize the dimensions with:
_matrix.resize(_rows, std::vector<MyReal>(_colms)); //_rows and _colms are ints
this command simply does nothing to the object. So to resize it i have to call first to:
_matrix.clear();
and then:
_matrix.resize(_rows, std::vector<MyReal>(_colms));
Of course, I'm losing the data. (In my case it doesn't matter)
Is this expected behaviour?