Problem with Visual Studio 2005

This is a discussion on Problem with Visual Studio 2005 within the C++ Programming forums, part of the General Programming Boards category; Hi, I am not sure if this is the best place to post this, but I am having a minor ...

  1. #1
    Registered User
    Join Date
    Mar 2007
    Posts
    23

    Problem with Visual Studio 2005

    Hi, I am not sure if this is the best place to post this, but I am having a minor problem with Visual Studio. I have started to use it for the development of C++ programs but as soon as I build a compilable cpp file like a simple Hello World program, it compiles fine, builds the program and displays the console window. However the window closes straight after displaying the line not even alowing me to see it.

    Does anyone know if there is an option under vidual studio to keep the window up and not close when the program has finished running? It is extremely annoying not being able to see the results of my program.

    Thanks for any inputs

  2. #2
    Deathray Engineer MacGyver's Avatar
    Join Date
    Mar 2007
    Posts
    3,211

  3. #3
    Registered User
    Join Date
    Jan 2005
    Posts
    7,338
    If you execute the program with Ctrl-F5 it will leave the window open for you. However, if you can learn to use the debugger that will be really helpful in your coding, so running it under the debugger with F5 might be better. In that case, you can always add a breakpoint at the end of your program to pause it while the window is still up. Put the cursor at the last line of main on the closing brace and hit F9. This will add a breakpoint there. You can then run your program, and when it is done it will hit the breakpoint and you can switch to the console window to see the final output.

    Those options are both related to VC++. You can also use the options in the FAQ and never worry about it, but if you don't want to alter your program for this issue then the above choices are good ones.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Console Font Size
    By bradszy in forum Windows Programming
    Replies: 34
    Last Post: 04-26-2008, 07:09 AM
  2. Templates and Macros plus more...
    By Monkeymagic in forum C++ Programming
    Replies: 8
    Last Post: 01-20-2007, 04:53 PM
  3. load gif into program
    By willc0de4food in forum Windows Programming
    Replies: 14
    Last Post: 01-11-2006, 09:43 AM
  4. ras.h errors
    By Trent_Easton in forum Windows Programming
    Replies: 8
    Last Post: 07-15-2005, 10:52 PM
  5. Linking error
    By DockyD in forum C++ Programming
    Replies: 10
    Last Post: 01-20-2003, 04:27 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21