Thread: Dev c++ compiler problem

  1. #1
    Unregistered
    Guest

    Unhappy Dev c++ compiler problem

    i'm using dev c++ compiler, I was just trying out some c code, just to display text on a screen, the compiler doesn't show this program. This is my code......

    /* basic program */
    #include <stdio.h>
    main()
    {
    printf ("text to be displayed");
    }

    any ideas?

  2. #2
    Registered User
    Join Date
    Dec 2001
    Posts
    227
    what is the error that you are getting.. btw try to add

    int main() in stead of just main()

  3. #3
    Registered User Nutshell's Avatar
    Join Date
    Jan 2002
    Posts
    1,020
    I think it works. It's just that it's quits too fast that u can't see the results. Try

    Code:
    /* basic program */ 
    #include <stdio.h> 
    int main() 
    { 
       printf ("text to be displayed"); 
       getch();
       return 0;
    }

  4. #4
    Unregistered
    Guest

    Thumbs up Thanks for the code, don't know why my code didn't work

    Thanks for the code, I wasn't getting any error message, it kind of looks like the program was running but nothing was appearing, my desktop just kind of flashed as if a new program had been opend, the code I had put into the compiler was taken from a proper C book, think i'll put it in the bin!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Weird compiler (Dev)
    By gavra in forum C Programming
    Replies: 11
    Last Post: 08-03-2008, 01:19 AM
  2. Starting with Dev C ; a problem
    By mabauti in forum C++ Programming
    Replies: 18
    Last Post: 12-05-2007, 11:16 AM
  3. added start menu crashes game
    By avgprogamerjoe in forum Game Programming
    Replies: 6
    Last Post: 08-29-2007, 01:30 PM
  4. Dev C++ Compiler - True or false?
    By JamesF in forum A Brief History of Cprogramming.com
    Replies: 6
    Last Post: 07-10-2006, 11:03 AM
  5. Comile problem using latest Dev C++ Compiler
    By shiny_dico_ball in forum C++ Programming
    Replies: 6
    Last Post: 06-06-2003, 05:32 PM