lundi 31 mai 2021

When I return object from function a copy constructor is called only of its an formal argument unless it is not calling copy constructor why so? [closed]

Code of creating temporary object inside fun

Result:No copy constructor called

Code of passing with parameter copy constructor called at return value why

Why copy con called at return value

Only retuning object

Still copy constructor called why??

Aucun commentaire:

Enregistrer un commentaire