I have a file that contains several paragraphs. Each paragraph starts with a §. Now I want to read all the lines in between two § into a vector<string>. (the § should not be in the vector)
I tried to read the file line by line into the vector and then go through the strings again, and if a string doesn't start with the symbol it's appended to the one before. But this doesn't work... any tipps?
I also tried reading only the 'good' lines using rfind. but then I didn't know which lines belonged together...
would replacing '\n' by some reg exp do the trick?
my second step constisted of a for loop containing two if statements and different functions on the string, e.g.