Advertisement
Guest User

Untitled

a guest
Mar 21st, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. #ifndef Person.h
  2. #define Person.h
  3. #include <string>
  4.  
  5. class Person
  6. {
  7. private:
  8. string name;
  9. int age;
  10. public:
  11. void setName(string);
  12. void setAge(int);
  13. string getName() const;
  14. int getAge() const;
  15. };
  16. void setName(string n)
  17. {
  18. name = n;
  19. }
  20. void setAge(int a)
  21. {
  22. age = a;
  23. }
  24. string Person.getAge() const;
  25. {
  26. return age;
  27. }
  28. string Person.getName() const;
  29. {
  30. return name;
  31. }
  32. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement