Thread: True c compilers

  1. #1
    Registered User
    Join Date
    Oct 2005
    Posts
    4

    True c compilers

    well i have been programming in c for around 3 months and actually i have tried to work with DEVC++ in the first two months but after learning about pointers i begin using them in my programs but...after playing with pointers i found that DEV C++ starts to show me some strange errors like dependency ERROR i thought it's a linker error so i started using the new version of DEVc++ but nothing changes so i tried another compiler the turbo c compiler but actually i didn't know how to work with more than one source file
    some people told me that i should try microsoft visual c++ 6.0 but actually it didn't work too
    any way plz guys tell me
    1-what are the best compilers that work under windows for c?
    2-what is better write c useing compilers that work under linux or windows?

  2. #2
    Registered User 00Sven's Avatar
    Join Date
    Feb 2006
    Posts
    127
    When you compile C code in Dev-C++ the file extension must be .c. The default is .cpp so you need to change it. If you leave it as .cpp it will compile as C++. This works most of the time but some things do give you errors.
    Windows XP Home Edition - Dev-C++ 4.9.9.2
    Quote Originally Posted by "The C Programming Language" by Brian W. Kernignhan and Dennis M. Ritchie
    int fflush(FILE *stream)
    On an output stream, fflush causes any buffered but unwritten data to be written; On an input stream, the effect is undefined. It returns EOF for a write error, and zero otherwise. fflush(NULL) flushes all output streams.
    board.theprogrammingsite.com

  3. #3
    Registered User
    Join Date
    Oct 2005
    Posts
    4
    lol actuall i know this i told you i have been using dev c++ for 3 months and i know most of the errors but once i start useing array pointers with functions ..errors starts to pops up

  4. #4
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Posts
    5,005
    About 99% of the time, it's a problem with your code, not your compiler. Perhaps you should try posting the troublesome code before throwing one of out the best compilers available.
    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.*

  5. #5
    Registered User
    Join Date
    Oct 2005
    Posts
    4
    well that's what i thought too but after butting all the functions in the same file and compileing it with turbo c compiler some of the code worked and actually i didn't use the trubo c because i want to work with more than one source code and also there is some errors that cause the turbo c to exit the compiler it self because iam working with the dos prombet ...guys just tell me compiler names i mean if any one if you is working with a good compiler just tell me the name.

  6. #6
    Registered User 00Sven's Avatar
    Join Date
    Feb 2006
    Posts
    127
    Dev-C++
    Windows XP Home Edition - Dev-C++ 4.9.9.2
    Quote Originally Posted by "The C Programming Language" by Brian W. Kernignhan and Dennis M. Ritchie
    int fflush(FILE *stream)
    On an output stream, fflush causes any buffered but unwritten data to be written; On an input stream, the effect is undefined. It returns EOF for a write error, and zero otherwise. fflush(NULL) flushes all output streams.
    board.theprogrammingsite.com

  7. #7
    Registered User
    Join Date
    Oct 2005
    Posts
    4
    lool ok guys if DEV C++ is the best compiler under windows xp then i should realy think in working under linux but keep the names comeing
    thanks

  8. #8
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,612
    Quote Originally Posted by Dave_Sinkula
    About 99% of the time, it's a problem with your code, not your compiler. Perhaps you should try posting the troublesome code before throwing one of out the best compilers available.
    Quoted for truth?
    Please do what Dave asked you to, it's a reaaally good idea. Especially since you've only been using C for three months. Look around for a program that will compile [potentially] broken code, and you'll be sorry.

  9. #9
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    Once again, people are confusing the IDE with the compiler.
    The underlying compiler is the MinGW port of GNU GCC. This is going to be one of the best compilers you're going to get for $0.

    The problems you describe have nothing to do with the compiler, but more to do with how the IDE generates (and then messes up project files).

    How well did you remove the old version before installing the new version?

    Others have suggested http://www.codeblocks.org/ before now as a replacement for the dev-c++ IDE

    Also, be more specific than "errors".
    Actual code and actual error messages please.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  10. #10
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    I don't know how well Dev-C++ works if you have more than one source file open with a main() function.

    Other than that, post the errors and maybe the code.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Forced moves trouble!!
    By Zishaan in forum Game Programming
    Replies: 0
    Last Post: 03-27-2007, 06:57 PM
  2. Socket class OOD
    By lord mazdak in forum C++ Programming
    Replies: 6
    Last Post: 12-17-2005, 01:11 AM
  3. help with MAZE
    By jpcorzo in forum C Programming
    Replies: 3
    Last Post: 11-24-2005, 01:47 AM
  4. DirectInput help
    By Muphin in forum Game Programming
    Replies: 2
    Last Post: 09-10-2005, 11:52 AM
  5. Compilers, Compilers, Compilers
    By Stan100 in forum C++ Programming
    Replies: 11
    Last Post: 11-08-2002, 04:21 PM