rename files, sex-

This commit is contained in:
vrd
2022-08-20 15:43:58 +03:00
commit fbfe017284
12 changed files with 1325 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
#pragma once
#include <fstream>
#include "common/basicTypes.h"
class Person
{
public:
Person() = default;
Person(const char* Name, unsigned char Day, unsigned char Monthay, short Year, bool Sex);
//
Person& operator=(const Person &other);
~Person();
bool operator==(const Person &other)const;
void save(std::ofstream &file)const;//
void load(std::ifstream &file);
void rename(const char* newName);
void print()const;
friend class Tree;
private:
char *name;
unsigned numRel; //Number of close relatives - mother, father, brother, sister, wife/husband, child, ex-wife/husband
unsigned char day, month; //Birth
short year;
bool isMale;
};