I need to know whether the following is valid in general.
string s = "some value"; string v = s.substr(0, 50).c_str();
Is the assignment to v always valid? Can there be any issues due to the temporary lifetime of object returned by substr()
v
substr()
Aucun commentaire:
Enregistrer un commentaire