nc print person
This commit is contained in:
+1
-2
@@ -1,2 +1 @@
|
||||
g++ -o bin/debug/famt -std=gnu++20 -g -Og -Wall *.cpp -lncursesw
|
||||
|
||||
g++ -o bin/debug/famt -std=gnu++20 -g -Og *.cpp -lncursesw
|
||||
|
||||
@@ -5,11 +5,13 @@
|
||||
|
||||
using std::cin;
|
||||
using std::cout;
|
||||
|
||||
int main()
|
||||
{
|
||||
setlocale(LC_ALL, "");
|
||||
initscr(); /* Start curses mode */
|
||||
noecho();
|
||||
cbreak(); /* get input instantly */
|
||||
refresh(); /* if not present the first real refresh is missed */
|
||||
|
||||
/*Tree test1("Dechkovi"); //addTree Dechkovi addTree Karamanovi load 0 load 1 (to work with these example trees)
|
||||
Tree test2("Karamanovi");
|
||||
@@ -51,10 +53,11 @@ int main()
|
||||
firstTree.addRelation(2, Brother, 3);
|
||||
firstTree.addRelation(2, Brother, 4);
|
||||
|
||||
firstTree.print();
|
||||
/* firstTree.print(); */
|
||||
firstTree.draw();
|
||||
firstTree.saveTree();
|
||||
|
||||
firstTree.printRel(3);
|
||||
/* firstTree.printRel(3); */
|
||||
firstTree.printOldestAncestors(3);
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -138,7 +138,7 @@ void Person::print()const
|
||||
waddstr(info_tab, "Death: ");
|
||||
death_.print();
|
||||
|
||||
mvaddstr(LINES-1, 0, "Press any key to return.");
|
||||
mvwaddstr(info_tab, LINES-1, 0, "Press any key to return.");
|
||||
|
||||
wrefresh(info_tab);
|
||||
getch(); /* waint press */
|
||||
|
||||
@@ -440,13 +440,17 @@ void Tree::removeRelation(const unsigned firstId, const unsigned secondId)
|
||||
}
|
||||
}
|
||||
|
||||
void Tree::draw() const
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void Tree::print() const
|
||||
{
|
||||
//for(const auto& member: people)
|
||||
// member.print();
|
||||
for(int i=0; i<numPeople;++i)
|
||||
people[i].print();
|
||||
people[i].print();
|
||||
}
|
||||
|
||||
void Tree::printRel(const unsigned id)const
|
||||
|
||||
@@ -55,6 +55,8 @@ public:
|
||||
void removeRelation(const unsigned firstId, const unsigned secondId);
|
||||
void removeRelation(const char* firstName, const char* secondName);
|
||||
|
||||
void draw() const;
|
||||
|
||||
void print()const;
|
||||
void printRel(const unsigned id)const; //Prints out close relatives
|
||||
void printMember(const unsigned id)const;
|
||||
|
||||
Reference in New Issue
Block a user