K
K
kytcenochka2018-03-29 13:37:53
C++ / C#
kytcenochka, 2018-03-29 13:37:53

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

1 answer(s)
N
NegroAzul, 2018-03-29
@NegroAzul

https://stackoverflow.com/questions/3946558/c-read...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question