Easy question regarding console apps

  • Thread starter Thread starter Paul Hemans
  • Start date Start date
P

Paul Hemans

Hi newbie here. I am learning c++/cli I by writing console apps. When my
apps finished they used to display a message at the bottom of the screen,
something like "press any key to continue" so that you could see the results
before returning to the IDE. But now they don't. I must have turned a
setting off somewhere but I can't find it. I could code it in but I would
prefer not to.

Any ideas?
 
Paul Hemans said:
Hi newbie here. I am learning c++/cli I by writing console apps. When my
apps finished they used to display a message at the bottom of the screen,
something like "press any key to continue" so that you could see the
results before returning to the IDE. But now they don't. I must have
turned a setting off somewhere but I can't find it.

Maybe. You get the prompt to close the console window when you choose to
execute your application without debugging it. When you debug it, it
executes to completion closing the console in the process.

You could choose to keep a console window open whose default directory is
the same as the location of the executable and then type its name to run it.
Ot you could add a read of the console just before you return. That will
force you to type something to quit.

Regards,
Will
 
Normally I press F5 to run the application, how do you execute an
application without debugging it? If I set the configuration to 'Release'
and press F5 the same thing happens.
 
Normally I press F5 to run the application, how do you execute an
application without debugging it? If I set the configuration to 'Release'
and press F5 the same thing happens.

Ctrl-F5 runs w/o attaching the debugger in the default key setup.
(It's in the menus as Debug -> Start without Debugging if you don't
have the stock VC++ keybindings set.) Also, as English is read top to
bottom, please type your responses below what you're replying to.

Nathan Mates
 
Ctrl-F5 runs w/o attaching the debugger in the default key setup.
(It's in the menus as Debug -> Start without Debugging if you don't
have the stock VC++ keybindings set.) Also, as English is read top to
bottom, please type your responses below what you're replying to.

Thank you, I don't know how I missed that
 
Back
Top