suppose I have this vector
vector<Object> m;
and then I have the following assignments:
vector<Object> o = m;
vector<Object> k = &m;
vector o will be a COPY of vector m whereas vector k will point to the exact same object as vector m….am I right?
in other words, if I go, o.push_back(something), this will modify vector o but not vector m whereas if I go k.push_back(something), this will indeed modify vector m.
am I wrong or right?
Right for
o, wrong fork.To make a reference, use