Cześć, co jest nie tak z tym kodem?
file.open("mainFile.txt");
string str;
if (file.is_open()) {
while (getline(file, str))
{
stringstream ss(str);
string name, surname, trade;
float salary;
getline(ss, name, ' ');
getline(ss, surname, ':');
getline(ss, trade, '-');
ss >> salary;
createSimpleEmployer(name, surname, trade, salary);
}
file.close();
}
Główny problem jest taki że kod w while się w ogóle nie wykonuje :(
Plik ma taki format:
Imię Nazwisko:xxxx-2987