Thread: Running my programs

  1. #1
    Registered User
    Join Date
    Jan 2005
    Posts
    21

    Running my programs

    When I compile my c code and try to run it, the screen pops up but goes away in a flash, I cannot see what the program is doing as it goes so fast, I am using Bloodshed's Dev-c++ on Windows XP, couls someone please tell me what I'm doing wrong this is the code-

    #include <stdio.h>
    main()
    {
    printf("Hello World\n");
    }

  2. #2
    [please, use the code tags (the [#] button)]
    Quote Originally Posted by ComDriver
    When I compile my c code and try to run it, the screen pops up but goes away in a flash, I cannot see what the program is doing as it goes so fast, I am using Bloodshed's Dev-c++ on Windows XP, couls someone please tell me what I'm doing wrong this is the code-
    Code:
    #include <stdio.h>
    main()
    {
        printf("Hello World\n");
    }
    A
    Code:
    return 0;
    is missing...

    Add a
    Code:
    (void) getchar();
    before the return. It's a well known issue of Dev-C++. I hope it will be fixed some day, because it generates a lot of traffic...
    Emmanuel Delahaye

    "C is a sharp tool"

  3. #3
    Gawking at stupidity
    Join Date
    Jul 2004
    Location
    Oregon, USA
    Posts
    3,218
    Be considerate and read this before posting code like it asks you to.

    Read the FAQ about your disappearing window problem.

    Not a good start here...but welcome anyway.
    If you understand what you're doing, you're not learning anything.

  4. #4
    Registered User
    Join Date
    Jan 2005
    Posts
    21

    Thanks

    Thanks for the help and I will be sure to add the code tags in my following posts.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Recommend upgrade path for C programs
    By emanresu in forum C Programming
    Replies: 3
    Last Post: 11-22-2007, 07:32 AM
  2. Monitor That Another App is Running
    By CodeButcher in forum Windows Programming
    Replies: 1
    Last Post: 01-18-2007, 01:34 PM
  3. Newbie question: pointers, other program's memory
    By xxxxme in forum C++ Programming
    Replies: 23
    Last Post: 11-25-2006, 01:00 PM
  4. help with running programs with c++
    By mendel69 in forum C++ Programming
    Replies: 5
    Last Post: 10-12-2006, 07:50 AM