user input: **HELLO**!!
what's suppose to happen:
firstWord = HELLO
inspectThis = **!!
this is what i have so far and right now i'm stuckCode:string extractWord (string& inspectThis) { string firstWord; int i = 0; while (inspectThis[i] != '\n') { if (isalpha(inspectThis[i])) { firstWord += inspectThis[i]; inspectThis[i] = NULL; } inspectThis[i] = NULL; i++; } return firstWord; }




Reply With Quote