daily pastebin goal
53%
SHARE
TWEET

Untitled

a guest Jul 21st, 2018 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Customer{
  2.     private:
  3.     string name;
  4.     string phone;
  5.     Customer *next;
  6.     vector<Customer*> clist = {};
  7.     public:
  8.     Customer(string name,string phone = " ",Customer *next = nullptr):
  9.     name(name),phone(phone),next(next){
  10.     }
  11.     string get_name()const{return this->name;}
  12.     string get_phone()const{return this->phone;}
  13.     Customer get_next(){return this->next;}
  14.     void add_customer(){
  15.        
  16.         cout<<"\nname of customer\t: ";cin >>name;cin.ignore(32000, '\n');
  17.         cout<<"\nphone number: ";cin >>phone;cin.ignore(32000, '\n');
  18.         Customer * c = new Customer{name,phone};
  19.         clist.push_back(c);
  20.      }
  21.    
  22.  
  23.     friend ostream& operator<<(ostream &os, const Customer &c);
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
 
Top