19 lines
348 B
C++
19 lines
348 B
C++
|
|
#ifndef EXAMPLE25_PERSON_H
|
|
#define EXAMPLE25_PERSON_H
|
|
|
|
#include <iostream>
|
|
|
|
class Person {
|
|
protected:
|
|
std::string name;
|
|
public:
|
|
Person(std::string n) : name(n) {};
|
|
virtual ~Person() {}
|
|
virtual void print() const {
|
|
std::cout << "Person: " << name << " " << std::endl;
|
|
}
|
|
};
|
|
|
|
#endif //EXAMPLE25_PERSON_H
|