Why temp object created when we have const reference? and why we have const ref in copy constructor?
String::String(const String& old_str) { size = old_str.size; s = new char[size+1]; strcpy(s, old_str.s); }
Aucun commentaire:
Enregistrer un commentaire