Most widely used compiler?

This is a discussion on Most widely used compiler? within the C Programming forums, part of the General Programming Boards category; Hello once again, I was just wondering now that I am reading a good C Book and want to try ...

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

    Most widely used compiler?

    Hello once again, I was just wondering now that I am reading a good C Book and want to try some of the tutorials, I was just curious what the best complier is to use? Currently I have Bloodshed Dev-C++ . I downloaded gcc I believe, I am not sure I just downloaded it off a random site since I couldn't find the link on their main site. So I downloaded gcc but confused on installing, so I am trying Turbo C++ now. I am just curious which is the best compiler that is easy and very good?

  2. #2
    Registered User ssharish2005's Avatar
    Join Date
    Sep 2005
    Location
    Cambridge, UK
    Posts
    1,682
    Luckly you have landed up on good compiler. Dev-C++ is a very good compiler which uses Mingw which connected to the port of GCC. I fact you compiler you program using gcc behind.

    With the Dev-C++, since you are beginner its better use Dev-C++ which has a very good IDE to start with. I use Dev-C++

    ssharish

  3. #3
    Registered User
    Join Date
    Sep 2007
    Posts
    23
    Quote Originally Posted by ssharish2005 View Post
    Luckly you have landed up on good compiler. Dev-C++ is a very good compiler which uses Mingw which connected to the port of GCC. I fact you compiler you program using gcc behind.

    With the Dev-C++, since you are beginner its better use Dev-C++ which has a very good IDE to start with. I use Dev-C++

    ssharish
    Thanks. The only reason I wanted to know of different compilers was because of an issue I was having. I am not sure if this is based off my computer or the code I typed in.

    But when I use
    Code:
    #include <stdio.h>
         int main()
    {
         printf("Hello World\n");
         return (0);
    }
    And I compile and run it and it closes instantly, so then I got to add

    Code:
    #include <stdio.h>
         int main()
    {
         printf("Hello World\n");
         getchar();
         return (0);
    }
    I got to add that for it not to close instantly. Is that code itself or just the code? I am just following a example out of a book I got. The few compilers they suggested for use I had trouble with them.

  4. #4
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    It depends on how you invoke the program, It should appear and close - because it's finished, why would it stay open? Some IDEs will keep the program open for you.

  5. #5
    Registered User
    Join Date
    May 2006
    Posts
    903
    It is actually the expected behavior. The program does what you tell it to do and you never told it to wait before closing; thus, it never waited. You can either open your program in a console or add user input at the very end of your program to fix that problem.

  6. #6
    Registered User
    Join Date
    Sep 2007
    Posts
    23
    Edit: NM I see exactly what you are saying.

    I don't know if I should find out how to install borland C++ or gcc since the book I am reading off of suggests both those and is mainly showing what to do in the book with those compilers.

    The reason I say I want to use one of those is because the examples they give me close when I am suppose to press "Enter" So I have to add
    Code:
    getchar();
    to everything I do, since it is thinking I am using a different compiler that does not close on the press of enter, I believe.
    Last edited by nubby; 10-02-2007 at 10:44 PM.

  7. #7
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Posts
    5,006
    Run a command-line program from the command line then.
    http://faq.cprogramming.com/cgi-bin/...&id=1043284385
    http://faq.cprogramming.com/cgi-bin/...&id=1043284385

    Don't ditch a wonderful compiler because of environment nonsense.
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

  8. #8
    Registered User
    Join Date
    Sep 2007
    Posts
    23
    Quote Originally Posted by Dave_Sinkula View Post
    Run a command-line program from the command line then.
    http://faq.cprogramming.com/cgi-bin/...&id=1043284385
    http://faq.cprogramming.com/cgi-bin/...&id=1043284385

    Don't ditch a wonderful compiler because of environment nonsense.
    Ah, thanks. See this is why I like these forums, helpful people.

    But wont
    Code:
    getchar();
    work as well? But I will be sure to read those links more after I am not busy.

  9. #9
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Posts
    5,006
    Quote Originally Posted by nubby View Post
    But wont
    Code:
    getchar();
    work as well? But I will be sure to read those links more after I am not busy.
    Essentially the same, depending on your program's input handling. In my preferred environment -- essentially a separate command shell, that stuff is silly and annoying.
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

  10. #10
    Registered User
    Join Date
    Sep 2007
    Posts
    23
    Quote Originally Posted by Dave_Sinkula View Post
    Essentially the same, depending on your program's input handling. In my preferred environment -- essentially a separate command shell, that stuff is silly and annoying.
    I see. Well glad for the help I got in this thread it is really helping me. I like Dev-C++ a lot and didn't want to really go to another compiler, but the book I am reading suspects I am using that compiler they listed, which is no problem now. Thanks everyone.

  11. #11
    Registered User
    Join Date
    Oct 2007
    Posts
    1
    I think C-free 4 is very good.

    You can download it using the below address.Good luck!

    http://www.programarts.com/download/..._edu_setup.exe

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. added start menu crashes game
    By avgprogamerjoe in forum Game Programming
    Replies: 6
    Last Post: 08-29-2007, 02:30 PM
  2. Compiler Paths...
    By Cobra in forum C++ Programming
    Replies: 5
    Last Post: 09-26-2006, 05:04 AM
  3. C Compiler and stuff
    By pal1ndr0me in forum C Programming
    Replies: 10
    Last Post: 07-21-2006, 12:07 PM
  4. I can't get this new compiler to work.
    By Loduwijk in forum C++ Programming
    Replies: 7
    Last Post: 03-29-2006, 06:42 AM
  5. how to call a compiler?
    By castlelight in forum C Programming
    Replies: 3
    Last Post: 11-22-2005, 11:28 AM

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