Thread: seeing my program

  1. #1
    Registered User
    Join Date
    Apr 2009
    Posts
    1

    seeing my program

    Hi

    I am kind new to C programming.
    When I wanne print "Hello World" on my screen,
    I write a program in DevC++ compile, and run it,
    but before I can even see the window with "Hello World" it is already gone,
    is there something I can put at the end of my code that will 'pause' the program until I hit enter or the window closes when I press enter.

    Thomas

  2. #2
    Registered User
    Join Date
    Jan 2009
    Posts
    13

    Smile

    In your Int main you need to write getch(); i started programing a couple of months back and had the same probelm lol!

    Code:
    int main()
    {
        setup();
        menu();
        getch();
        return 1;
    }
    Something like that! After you have viewed the information you wanna see on screen just press return!

    hope that helps bud!

    Chris

  3. #3
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,268
    There is a FAQ entry for this topic.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Issue with program that's calling a function and has a loop
    By tigerfansince84 in forum C++ Programming
    Replies: 9
    Last Post: 11-12-2008, 01:38 PM
  2. Need help with a program, theres something in it for you
    By engstudent363 in forum C Programming
    Replies: 1
    Last Post: 02-29-2008, 01:41 PM
  3. Replies: 4
    Last Post: 02-21-2008, 10:39 AM
  4. My program, anyhelp
    By @licomb in forum C Programming
    Replies: 14
    Last Post: 08-14-2001, 10:04 PM