[Solved] Std::vectors – copying vs creating a reference

[ad_1]

std::vector<int> b = a;

will this creates b as a copy (new object with same contents) of vector a or as a reference to it?

that create b as a new vector being a copy, so b.append(1); does not change a

[ad_2]

solved Std::vectors – copying vs creating a reference