Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
copy constructor
class Obj {
//default constructor
Obj(int size){
..
}
//copy constructor
Obj(const Obj& other){
..
}
//assignment operator
Obj& operator= (const Obj& other){
..
}
}
Obj B;
B = Obj(1000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment