I’m writing a getline function below but I want the delimiting character to be two consecutive newline characters such the function stops reading once it reaches a blank line.
in.getline(temp, 127, delimiter);
Is it possible to do this with getline?
Delimiter must be a single character for
istream::getline. However, you could always buffer the result yourself, checking the next character (peek) to see if its a newline.