I’ve a string (ifstream) with next lines:
foo
foo+..
foo
And, I’d like know how to get the line where there is a symbol + and erase the remaining lines:
foo+..
to convert the stream into a string, I use:
string stream((std::istreambuf_iterator<char>(file)), std::istreambuf_iterator<char>());
How about this alternative solution: