Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Bank_Client& Bank_Client::operator=(const Bank_Client &addres){
- std::string *temp = new std::string(*addres.name);
- delete name;
- name = temp;
- return *this;
- }
- Bank_Client bob("Bobinsky");
- bob = bob;
- Bank_Client& Bank_Client::operator=(const Bank_Client &addres){
- if (this != &addres){
- delete name;
- name = new std::string(*addres.name);
- }
- return *this;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement