having a doubt regarding compiler

This is a discussion on having a doubt regarding compiler within the C++ Programming forums, part of the General Programming Boards category; Hi, I have a doubt regarding the compiler which I installed. I am using Borland C++. I think the version ...

  1. #1
    Registered User
    Join Date
    Jun 2005
    Posts
    12

    Question having a doubt regarding compiler

    Hi, I have a doubt regarding the compiler which I installed. I am using Borland C++. I think the version is 4.52.
    Is it possible to compile and execute C programs. If possible, wat extension should I use to save the C files..?
    Also Whether it is possible for me to work out Graphics in C...?

    Waiting for your reply. Bye.

    satyan

  2. #2
    Dae
    Dae is offline
    Deprecated Dae's Avatar
    Join Date
    Oct 2004
    Location
    Canada
    Posts
    1,034
    - I think Borland automatically detects whether to compile as c or c++ by the extension of your filename. But yeah, it does.
    - The extension for a C file is .c
    - You can make graphics in C using graphics libraries, but thats a bit more of an advanced topic, in which you'd probably turn to explore C++ before you get to.

    Since you're new I'd suggest Dev-Cpp by the way, its a Windows IDE and IMHO more clear and simple when starting.
    Warning: Have doubt in anything I post.

    GCC 4.5, Boost 1.40, Code::Blocks 8.02, Ubuntu 9.10 010001000110000101100101

  3. #3
    Its hard... But im here swgh's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,475
    Erm, I have heard that Borland compilers fail to fully implement the C++ C standard, but it all depends on what updated version you have. I use Dev C++ and wprks fine for me.
    To be honest, as C++ has retained almost all of C, there should not be a problem for your queery. Although, some older compilers do not accept newer headers:

    example:

    old header == #include <iostream.h> ' used in C'

    new header == #include <iostream> 'used in almost evrey new comiler and IDE.

    it really depends on what you want to do, but I would of throught the Borland compiler would be able to link the C programs, if you have any errors you do not understand ask the board, that is what we are here for!! Good luck in your coding

  4. #4
    Registered User
    Join Date
    Jun 2005
    Posts
    5,869
    Quote Originally Posted by swgh
    Erm, I have heard that Borland compilers fail to fully implement the C++ C standard, but it all depends on what updated version you have.
    That is true of most compilers, not just Borland.

    Borland aims for standard compliance, and comes reasonably close, particularly with later compilers. AFAIK, they do not support C99 (the C standard of 1999). There are some features of C++ (eg export) that do not work with Borland compilers; but that's true of most vendors. Older versions of compilers tend to be less compliant with standards than later versions.

    Borland compilers aren't perfect, but they are pretty reasonable.

    Quote Originally Posted by swgh
    I use Dev C++ and wprks fine for me.
    Dev C++ is another compiler which is imperfect, but also pretty reasonable.
    Quote Originally Posted by swgh
    To be honest, as C++ has retained almost all of C, there should not be a problem for your queery.
    There are some differences (eg it is possible to create C code that will not compiler with a C++ compiler), but what you say is mostly correct.

    Quote Originally Posted by swgh
    Although, some older compilers do not accept newer headers:

    example:

    old header == #include <iostream.h> ' used in C'

    new header == #include <iostream> 'used in almost evrey new comiler and IDE.
    No C compiler has ever supported either <iostream.h> or <iostream>. They have only ever been C++ specific headers.

    <iostream.h> is supported by some older, pre-standard, C++ compilers. It was superseded, during the C++ standardisation process, by <iostream>. Standard C++ only supports <iostream>, but some C++ compilers support <iostream.h> for backward compatibility to older, prestandard, versions of C++.

  5. #5
    Its hard... But im here swgh's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,475
    thank you grumpy, I was a little unsure about the headers, you have put me straight lol!

  6. #6
    Registered User
    Join Date
    Jun 2005
    Posts
    12

    Smile hi..thanks for everyone who replied for my query

    hi, thanks a lot for everyone who replied for my query. Although I am a beginner, I think B C++ is enough. once again, thanks to everyone.

    bye.

    satyan.

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, 01:30 PM
  2. Compiler Paths...
    By Cobra in forum C++ Programming
    Replies: 5
    Last Post: 09-26-2006, 04:04 AM
  3. C Compiler and stuff
    By pal1ndr0me in forum C Programming
    Replies: 10
    Last Post: 07-21-2006, 11:07 AM
  4. I can't get this new compiler to work.
    By Loduwijk in forum C++ Programming
    Replies: 7
    Last Post: 03-29-2006, 05:42 AM
  5. how to call a compiler?
    By castlelight in forum C Programming
    Replies: 3
    Last Post: 11-22-2005, 10:28 AM

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