lundi 21 juin 2021

how can i write copy constructor correctly

I implement a copy constructor like this myclass (const myclass & res) { } and my constructor like this myclass () { }

then complie ,show the error "no matching function for call to 'myclass () ' myclass (const myclass & res) "

please solve my doubts

Aucun commentaire:

Enregistrer un commentaire