1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

C++ noob help.

Discussion in 'C++' started by madhu, Aug 21, 2005.

  1. madhu

    madhu New Member

    i'm a C++ noob, and i'm trying to learn it and all. but anyways, i got Visual C++ 6.0 and am running XP, and i'm having issues running the EXE after i compile the program, it runs and all. but it shuts off before it shows the output. I fixed this problem before, but it was like 4 monthes ago and i havent messed with it since, but i forgot how. So, any ideas?
  2. shabbir

    shabbir Administrator Staff Member

    There are 2 ways to compile and run the program in MS VC++ 6.0 With Ctrl + F5 and with only F5. Now I would like to tell what will be the difference between the two in your case.

    Case: F5
    When you run the program with F5 the exe will start running and will eventually end without you being able to see the output you printed after the last scanf (user input). The best way to make the screen hold on the screen is to put a getch() at the end of the program and print something like Press any key to exit ...

    Case: Ctrl + F5
    When you run the program with F5 the exe will start running and will eventually end but giving you a message Press any key to continue ... which you have given in the above scenario. Now if you have given the getch method then it will be twice and to avoid that you

    Am I not looking like programmer, giving case in the explanation as well.

    Shabbir Bhimani
    Last edited: Aug 21, 2005
  3. coderzone

    coderzone Super Moderator

    I really thought so
  4. madhu

    madhu New Member

    Thanks for the help. Lots of things were just too good for me to catch but at the end did it succesfully

Share This Page