| 42 | name[len] = '\0'; |
| 43 | } |
| 44 | void setBorn(int b) |
| 45 | { |
| 46 | if (b >= 1990 && b <= 2020 ) |
| 47 | born = b; |
| 48 | else |
| 49 | std::cerr << "The input b is " << b << ", and should be in [1990, 2020]." << std::endl; |
| 50 | } |
| 51 | // the declarations, the definitions are out of the class |
| 52 | void setGender(bool isMale); |
| 53 | void printInfo(); |