KsiazkaAdresowa/main.cpp
// reading/writing to file contacts
reading/writing to file contacts
reading / writing to file contacts
void readFromFile_contacts(fstream &file, vector<Contact> &contacts, int loggedUserId) {
    string line;
    Contact contact;
    while(getline(file,line)) {
        contact = getContactFromString(line,'|');
        if (contact.idUser == loggedUserId) {
            contacts.push_back( contact );
        }
    }
}
void readFromFile_contacts ( fstream & file , vector < Contact > & contacts , int loggedUserId ) { string line ; Contact contact ; while ( getline ( file , line ) ) { contact = getContactFromString ( line , ' ' ) ; if ( contact . idUser == loggedUserId ) { contacts . push_back ( contact ) ; } } }
reading/writing to file contacts
reading / writing to file contacts