-
Please post your code in [code][/code] tags, tell us exactly what is not working, what input you give it, and the output you get or the exact compiler errors you get.
BTW, I edited my post above and gave one reason why your while loop might not work. See if that is the issue.
-
You'll need to include <string> and have using namespace std or using std::string either directly or indirectly (in a header file). If it compiles then you've already done this.
-
Isn't an int needed in front of main?
-
It is supposed to be there according to the standard, but some compilers will allow code without it. Regardless, there isn't really a good reason not to put it in.
-
-
ahh...
Another thing learned. I really should read the FAQ.