I have started coding lately(school curriculuim) and ran into a little problem. I want to read a .txt file, the lines are like "firstname lastname;phonenumber".
ifstream file("names.txt");
string line, fname, lname;
int num;
while (getline(file, line)) {
istringstream iss(line);
iss >> fname >> lname >> num;
}
So the problem is that the lastname is lastname + ";" + phone number and I don't know how to separate them. Any help is appreciated :)
Edit: Thanks for the quick replies!