The while-loop will only run as long as input is NOT equal "exit", meaning that whenever the user enters "exit", the while-loop will stop. The problem is that you are initializing input to "exit" at the beginning of the program, so the while-loop will never run. Initialize input to something else, or just "".
This ony appears if you add this line in your prgramme.
system("PAUSE");
Since I don't see that in your code than the other most probable cause could be that your compiler is adding it automatically, Compilers do that because If you run a simple console program which does to reach to a point where it ask something from the user and just keep printing out text to the console window and then terminate, than all this will happen in a second (for a simple code) and console window will close.
So I suggest you go through the documentation of your IDE to find that option and disable (deselect) it. But remember than you should just compile you programs. Then Run cmd.exe and go to your executable and run it to test.
Quite funny that it took half a page until someone (fanfer) pointed out that he initialized his string as "exit", thus never entering the loop. The obvious mistakes are always the hardest to spot!
@Danishx83: My old compiler, which was just an older version of MSC++Express did that as well when running without the debugger (Ctrl+F5). The newer versions no longer do that.