dperego,
This question should be asked on a C++ forum (see link below). C++ can handle this easily and I’ve included a link to a page where I frequent often as reference.
For each line you will need to search for the delimiter or the eos character.
I don’t have any code to show you, but it is easy enough to find on the web.
Dave
cplusplus.com/reference/string/
cboard.cprogramming.com/forumdisplay.php?f=3