[cpp] Person.h

Viewer

copydownloadembedprintName: Person.h
  1. #ifndef PERSON_H_
  2. #define PERSON_H_
  3.  
  4. #include <iostream>
  5. #include <sstream>
  6.  
  7. using namespace std;
  8.  
  9. class Person{
  10. private:
  11.     string name;
  12.     unsigned int age;
  13. public:
  14.     Person();
  15.     string toString();
  16.     void setName(string name);
  17.     string getName();
  18.     void setAge(unsigned int age);
  19.     unsigned int getAge();
  20. };
  21.  
  22.  
  23. #endif

Editor

You can edit this paste and save as new:


File Description
  • Person.h
  • Paste Code
  • 11 Dec-2023
  • 354 Bytes
You can Share it: