string str, temp;
char c;
cout << "Insert the character that ends the input:" << endl;
cin >> c;
cout << "Insert the string:" << endl;
getline(cin, str, c);
I should be able to put into the string "test" a string until I digit the ending char. But if I enter a double new line it doesn't recognize the ending char and it doesn't end the input:
Insert the character that ends the input:
}
Insert the string:
asdf
}
do it}
damn}