Hello folks,
let's say we have a class
class MyClass {
vector<vector<int > > myMatrice;
public :
MyClass(vector<vector<int > > &);
}
MyClass::MyClass(vector<vector<int > > & m) {
myMatrice = m;
}
During the instanciation of MyClass, I pass a big vector < vector < int > > and I find that the object is actually copied and not only the reference, so it takes the double of the memory ...
Please, can anyone help me out with this problem, I'm stuck since too many time ...
And thanks a lot!