Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.42 KB | None | 0 0
  1. CCustomer::CCustomer(char* name, int age) {
  2.     CCustomer(name, age, true);
  3. }
  4.  
  5. CCustomer::CCustomer(char* name, int age, bool is_male) {
  6.     this->SetName(name);
  7.     this->SetAge(age); 
  8.     this->SetGender( (is_male) ? Male : Female );
  9. }
  10.  
  11.  
  12.     CCustomer c1("jojo",34);
  13.     cout << endl << "first CCustomer" << endl;
  14.     c1.Print(cout);
  15.  
  16.     CCustomer c2("momo",22,true);
  17.     cout << endl << "second CCustomer" << endl;
  18.     c2.Print(cout);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement