lundi 26 juin 2017

Function returns a string as a rvalue

I am a new C++ beginner. I don't understand why the expression

string three() { return "kittens"; }

returns an rvalue. Is it because of the returned string(kittens) a temporary value? Thank you so much

Aucun commentaire:

Enregistrer un commentaire