X-Git-Url: https://ruin.nu/git/?p=adress.git;a=blobdiff_plain;f=file.cpp;fp=file.cpp;h=0000000000000000000000000000000000000000;hp=86e57d136a9806c875ba5d23ae4c69ea1ed0f642;hb=47556496969ef4c98f36d54c0dd1eac44d2d6caf;hpb=e23c6cb03fe262ee52e7b34803ce0dc0233e42a3 diff --git a/file.cpp b/file.cpp deleted file mode 100644 index 86e57d1..0000000 --- a/file.cpp +++ /dev/null @@ -1,44 +0,0 @@ -#include -#include -#include "functions.h" -#include - -void load() -{ - ifstream in("/root/.adress"); - - while (!in.eof()) - { - string fname; - string lname; - string adr; - string pn; - getline(in, fname); -// cout << "Skapar " << fname << "\n"; -// cin.get(); - getline(in, lname); - getline(in, adr); - getline(in, pn); - if (fname == "" && lname == "" && lname == "" && pn == "") - continue; - (void) new CContact(fname, lname, adr, pn); - } -} - -void save() -{ - ofstream out; - out.open("/root/.adress"); - - CContact* contact = CContact::getFirst(); - - while ( contact != '\0') - { - out << contact->firstname() << "\n"; - out << contact->lastname() << "\n"; - out << contact->adress() << "\n"; - out << contact->phoneNumber() << "\n"; - contact=contact->getNext(); - } - out.close(); -}