OK ... if i read in a string, how do i get rid of any leading/trailing whitespace? here's how i am reading in the string...
So, how do I get rid of leading or trailing whitespace? whitespace includes the space character as well as tab.Code:const int maxStrLen(100);
.
.
.
char userInput[maxStrLen];
cin.getline(userInput, maxStrLen, '\n');
.
.
.