The function Reverse does seem to work. Its supposed to take the words in a sentence and then reverse them. For example: "This is nice" to "Nice is this."
When I type "This is nice" I get " niceniceis nice"
I can't seem to find the problem.
Thanks in advance
I just put some cout statements into the reverse function to show what's happening with the str and result variables.
Enter first words
this is nice
Number of words: 3
next blank: 4
str: is nice
result: is nice
next blank: 2
str: nice
result: niceis nice
next blank: -1
Reverse version: niceniceis nice
Enter next line