SHARE
TWEET

Untitled

a guest Feb 23rd, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Bank_Client& Bank_Client::operator=(const Bank_Client &addres){
  2.     std::string *temp = new std::string(*addres.name);
  3.     delete name;
  4.     name = temp;
  5.     return *this;
  6. }
  7.      
  8. Bank_Client bob("Bobinsky");
  9. bob = bob;
  10.      
  11. Bank_Client& Bank_Client::operator=(const Bank_Client &addres){
  12.     if (this != &addres){
  13.         delete name;
  14.         name = new std::string(*addres.name);
  15.     }
  16.     return *this;
  17. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top