do{
chatLike("Enter student's full name: ");
getline(cin, name, '\n');
//I have my try-catch here
}while(error==true);
chatLike is a function that i made that produces the cout character per character.
program immediately crashes when input is:
a)input is space only or a single space
b)input ends with one or multiple spaces
error is "debug assertion failed (then a path here pointing to xstring line:1441) string subscript out of range".
i've been googling for 2 days now it's getting frustrating. been trying to find a way to try and manipulate the input before storing it in name in a way that it will not accept case a and b. :-/ but i also thing that would not work.