^^The problem is I don't know the Alt+F5 equivalent in MS Visual C++. Only this I want to know. Now I am using MinGW which has no such fuss. But if you know any such "Alt+F5 equivalent", please tell me.
P.S.:-Now I m not using system("pause") or cin.get() or any such thing to trap keyboard input.
I also have not been able to find a solution for this.
Whenever I use Visual Studio for console apps (like never, unless absolutely required), I tend to use a blocking input statement like cin.get()/Console.Read() while
debugging only.
The reason being, console apps are meant to be
- Fired.
- Parse args or read input.
- Give output, if any.
- Die.
Or when I'm feeling lazy, I run
sans the debugger (Shortcut Ctrl+F5). This gives me a "Press a key to continue..." prompt.
But that's rarely the case, since most of what I do are services meant to run indefinitely until a exit character appears.
PS: Remove these blocking statements in your Release builds since it comes to bite you in the hiney. Forking the programs having blocking input statements as their last one's, are every programmer's nightmare when the I/O streams are redirected. Trust me.