I am writing a program and I need some help. I need to know how to analyze a string, and then word by word reverse the order of that string. For example:

User Input: Hello to the world!
Program Output: olleH ot eht !dlrow
First problem: I need the program to read the string word by word, and sort of isolate each word. How do I do this?!

Second problem: After isolating each word, I would like to use a pointer variable that assigned to the first character, and then a pointer variable that is assigned to the last character of the SAME word, and then switch those. Continue for all the words in the entire string, like my example above.

NOTE: I know there are reverse(), begin(), and end() member functions, but I do not want to do that. I want to MANUALLY do this through my program. Thanks for the help!