im trying to get user input using getline. i give this statement
if (!getline(cin, string, '/'))
this program keeps on getting input until i give '/' in cin.
is there anyway if i dont give '/' and give anyother input and it should give me an error that it was a valid input(should have / at end)...
currently it doest give the error and keeps on getting input even if i hit enter unless i give it '/' delimitor.Code:while (true)