Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Customer{
- private:
- string name;
- string phone;
- Customer *next;
- vector<Customer*> clist = {};
- public:
- Customer(string name,string phone = " ",Customer *next = nullptr):
- name(name),phone(phone),next(next){
- }
- string get_name()const{return this->name;}
- string get_phone()const{return this->phone;}
- Customer get_next(){return this->next;}
- void add_customer(){
- cout<<"\nname of customer\t: ";cin >>name;cin.ignore(32000, '\n');
- cout<<"\nphone number: ";cin >>phone;cin.ignore(32000, '\n');
- Customer * c = new Customer{name,phone};
- clist.push_back(c);
- }
- friend ostream& operator<<(ostream &os, const Customer &c);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement