lundi 24 février 2020

c++ the difference between string using the assign function and directly using '=' to change the value

For example, this code

std::string a("this is a string");
std::string b;
b = a;
std::string c;
c.assign(a);

Is there any difference between B and C in essence?

Aucun commentaire:

Enregistrer un commentaire