Answer the question
In order to leave comments, you need to log in
How to read data from a text file into a C++ struct?
Suppose a line in a file has three parameters, separated by commas, it can be an empty value. How to read values into a structure and then overwrite them in another file.
Vasya, ,23
Petya, Ivanov, 45
Olya, Petrova, 25
struct student
{
string name;
string lastname;
int age;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question