initial release

This commit is contained in:
vrd
2023-03-01 10:10:39 +02:00
parent b9151efc13
commit 199a8b527c
6 changed files with 71 additions and 52 deletions
+11 -11
View File
@@ -1,15 +1,15 @@
#include <ncursesw/ncurses.h>
#include "tree.hpp"
#include "utils.hpp"
/* #include <ncursesw/ncurses.h> */
/* #include "tree.hpp" */
/* #include "utils.hpp" */
#include "user_tree.hpp"
/* #include "user_tree.hpp" */
int main()
{
init();
/* int main() */
/* { */
/* init(); */
create_tree();
/* create_tree(); */
endwin(); /* stop ncursers */
return 0;
}
/* endwin(); /\* stop ncursers *\/ */
/* return 0; */
/* } */
+53
View File
@@ -0,0 +1,53 @@
void create_tree()
{
// Declare your tree
Tree t("first_tree");
// Add member Adam with parents Nobody
t.addPerson("Адам", M, // ID 0
Nobody, Nobody,
{0, 1, 6}); // Born: y, m, d
t.addPerson("Ева", F, // ID 1
Nobody, Nobody,
{0, 1, 6});
// Adam (0) is a Spouse of Eve (1)
t.addRelation(0, Spouse, 1);
// Add Cain with parents Adam (0) and Eve
t.addPerson("Кайн", M,
0, 1);
t.addPerson("Авел", M,
0, 1);
t.addPerson("Сит", M,
0, 1,
230);
t.addPerson("Енос", M,
4, Nobody,
435);
t.addPerson("Каинан", M,
5, Nobody,
605);
t.addPerson("Малелеил", M,
6, Nobody,
605);
t.addPerson("Енох", M,
3, Nobody);
t.addPerson("Гаидад", M,
8, Nobody);
t.addPerson("Малелеил", M,
9, Nobody);
/* t.saveToFile(); */
t.display();
}