Which complier?

This is a discussion on Which complier? within the C++ Programming forums, part of the General Programming Boards category; I know this question is too basic but i am sorry that i am bring it up again. Which Compiler ...

  1. #1
    Registered User
    Join Date
    Nov 2005
    Posts
    1

    Which complier?

    I know this question is too basic but i am sorry that i am bring it up again. Which Compiler should i use??
    I am using a Windows Xp SP2. Which is a good complier for me to start off with??? I already have Borland Command Line 5.5 and Dev C++. But a code that works in Borland CL does not work in Dev C++ and vice versa. Why is it like that???? Is there no standard in C++???
    Pls advice me. I am a total newbie who wants to be a C++ programmer.

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,415
    Which is a good complier for me to start off with??? I already have Borland Command Line 5.5 and Dev C++.
    Probably the compiler that comes with Dev-C++, which should be the MinGW port of GCC 3.4.x
    Of course, that's assuming you download Dev-C++ 4.9.9.x

    You can also consider the compiler that comes with Microsoft Visual C++ 2005 Express, which is currently a free download.

    Is there no standard in C++?
    When will we have a C++ standard?
    Chances are you are not writing standards compliant code, or you use non-portable libraries.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    C / C++
    Join Date
    Jan 2006
    Location
    The Netherlands
    Posts
    312
    Borland is old compared to Dev-c++, I experienced that too....
    Operating Systems:
    - Ubuntu 9.04
    - XP

    Compiler: gcc

  4. #4
    Registered User
    Join Date
    Jan 2005
    Posts
    7,317
    Note that the standard was finished relatively recently, and C++ as a language is much older than its standard, which is why there is a lot of code that is pre-standard and a lot of compilers, books, tutorials, etc that don't conform to the standard. Also note that while C++ is standardized, there is no standard library support for many common things like graphics, guis, threads, etc. Instead, users must rely on third-party libraries (or their own) which may or may not be based on portable code.

  5. #5
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398
    If you want to know what is standard, a couple of good references are:

    CPPreference.com
    Dinkumware.com

    If the header or function is not there, its not compliant. (Of course, if a custom function is defined within the code itself, it is still compliant.)

    There is a lot you can do with standard C++, and you could easily spend two semesters of college learning standard C++. In fact, most good C++ classes and books start-out with standard C++. But, your programs wouldn't "look cool" without graphics or a mouse. That's one of the downsides to C++. You have to learn quite a bit before you can make programs that will impress your friends.

    Most compilers try to be compliant. They will compile most compliant code. Most of the time, the problem is the code, not the compiler!

    But, here's the thing... most compilers (including very-compliant compilers) include lots of extra headers (graphics & stuff) that's above and beyond the standard. And, most real-world programs have non-compliant code. That's why you don't see all programs available for the PC, MAC, Linux, and everything else.... It's a lot of work to "port" programs to another computer.

    There are Windows API functions that you can use in any Windows compiler. These are Windows C++ standard, but not ANSI/ISO standard. So, you can take an example out of Petzold's Programming Windows book and compile it on Borland, Microsoft, or Dev-C++, enen though it contains almost no ANSI/ISO standard C++.

  6. #6
    Registered User
    Join Date
    Mar 2006
    Posts
    725
    I like Code::Blocks, it's clean and powerful.

    The important thing is the code, not the compiler. Your code should compile on any compiler. If it breaks a standards-compliant compiler, chances are your code is not standards-compliant, or uses bad programming style which doesn't happen to compile.

    If you're a total newbie, I suggest you go read up a good C++ tutorial like this or this, it'll help get you started. Then you can move on to bigger things.

  7. #7
    Mad OnionKnight's Avatar
    Join Date
    Jan 2005
    Location
    Umeň, Sweden
    Posts
    555
    Quote Originally Posted by sreenadh
    But a code that works in Borland CL does not work in Dev C++ and vice versa. Why is it like that???? Is there no standard in C++???
    Pls advice me. I am a total newbie who wants to be a C++ programmer.
    Code that conforms to standards should work on pretty much all compilers. Show me some example code that doesn't compile in Borland or Dev-C++.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How do I add .C Project to my complier?
    By php111 in forum C Programming
    Replies: 82
    Last Post: 10-03-2008, 04:12 PM
  2. DOS C complier.
    By curious in forum C Programming
    Replies: 15
    Last Post: 06-22-2008, 11:50 PM
  3. C # complier
    By obaid in forum C# Programming
    Replies: 2
    Last Post: 02-17-2008, 02:23 PM
  4. complier with bios.h
    By neuflex in forum C Programming
    Replies: 6
    Last Post: 03-08-2005, 06:27 AM
  5. complier design
    By condorx in forum C Programming
    Replies: 1
    Last Post: 04-06-2002, 08:47 AM

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