So my program is taking input from the user, so it's storing it in a string known as x. But I don't want x to take the input after a hard return, it should keep reading until it hits a certain string, let's say "END", so until the user types END, the variable will take everything until that end.
Using getline() you can add a "deliminating character" so that when a CHAR is read, it will stop. i.e. getline(cin, x, 'Q') will keep getting more input until the user types Q followed by a hard return. Is it possible to have a "deliminating string" instead of the character? I already tried it with getline, and it doesn't seem to help.
I need my input to end when the user types "END".
I tried getline(cin, x, "END"), but to no avail.
Appreciate the help once again!