whitespace
This commit is contained in:
@@ -8,6 +8,8 @@ using std::cout;
|
||||
|
||||
int main()
|
||||
{
|
||||
initscr(); /* Start curses mode */
|
||||
|
||||
/*Tree test1("Dechkovi"); //addTree Dechkovi addTree Karamanovi load 0 load 1 (to work with these example trees)
|
||||
Tree test2("Karamanovi");
|
||||
|
||||
@@ -37,7 +39,7 @@ int main()
|
||||
test2.saveTree();*/
|
||||
|
||||
Tree firstTree("firstTree");
|
||||
|
||||
|
||||
firstTree.addPerson("Адам,", true, Nobody, Nobody, {0, 1, 6});
|
||||
firstTree.addPerson("Ева", false, Nobody, Nobody, {0, 1, 6});
|
||||
firstTree.addRelation(0, Husband, 1);
|
||||
@@ -50,11 +52,15 @@ int main()
|
||||
|
||||
firstTree.print();
|
||||
firstTree.saveTree();
|
||||
|
||||
|
||||
firstTree.printRel(3);
|
||||
firstTree.printOldestAncestors(3);
|
||||
|
||||
|
||||
/* ====================================================== */
|
||||
|
||||
refresh(); /* Print it on to the real screen */
|
||||
|
||||
Array<Tree> trees;
|
||||
|
||||
bool quit = false;
|
||||
@@ -90,13 +96,13 @@ int main()
|
||||
};
|
||||
|
||||
unsigned curTree = 0, //Currently selected tree ID
|
||||
id, secondId; //Indexes
|
||||
Tree *newTree;
|
||||
id, secondId; // Person IDs
|
||||
Tree* newTree;
|
||||
char name[128], secondName[128];
|
||||
U8 day, month; //TODO add h m
|
||||
U16 year;
|
||||
bool sex;
|
||||
unsigned father, mother;
|
||||
unsigned father, mother; // IDs
|
||||
|
||||
do
|
||||
{
|
||||
@@ -122,8 +128,8 @@ int main()
|
||||
trees[curTree].rename(name);
|
||||
break;
|
||||
case 2: //load
|
||||
cin >> input;
|
||||
trees.push(Tree(input));
|
||||
cin >> input;
|
||||
trees.push(Tree(input));
|
||||
if (!trees[trees.gNum() - 1].loadTree())
|
||||
std::cout << "File doesnt exist or is empty.\n\n";
|
||||
break;
|
||||
@@ -262,5 +268,8 @@ int main()
|
||||
|
||||
} while (!quit);
|
||||
|
||||
endwin(); /* stop ncursers */
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user