31 lines
528 B
C++
31 lines
528 B
C++
|
|
|
|
#ifndef person_H
|
|
#define person_H
|
|
|
|
#include <string>
|
|
|
|
#include <boost/serialization/access.hpp>
|
|
|
|
class Person {
|
|
public:
|
|
virtual void askForInfo();
|
|
void display();
|
|
|
|
private:
|
|
virtual void doDisplay();
|
|
|
|
std::string firstName;
|
|
std::string lastName;
|
|
int age;
|
|
|
|
template <class Archive> void serialize(Archive &ar, const unsigned int version) {
|
|
ar &firstName;
|
|
ar &lastName;
|
|
ar &age;
|
|
}
|
|
friend class boost::serialization::access;
|
|
};
|
|
|
|
#endif
|