I want to make a parser that will load info into a struct from a file. The format looks like this:
%Block Number One%
Where the first line (%Block Number One%) is loaded into an std::string, 3 is the number of block lines, and each block line is subdivided into cells. The cells are divided by .s, with + denoting a newline. I would actually rather just eliminate the + and use newline insead. Anyway, it is supposed to load each 'cell' into a struct containing three integers, and each number (like each 0 in 000, or the ones and the two in 112) is loaded into one of the three integers, to if we had
int one, two, three;
if we loaded 152 into it, one would equal 1, two would equal 5, and three would equal 2. Also, it needs to set one, two and three to -1 if the separator is a + sign (or a newline, which would be better). Sorry about the huge post, but I have no idea how to do this efficiently. Thanks.