I'm new to programming.. And i want to download a compiler to practice it. I'm kind of confused on what compiler to download..And i want to download a C compiler..but then there are stuffs online which offers C/C++ compilers..is there any difference?
What is the difference of a C and C++ compiler?
In general terms, C++ is an object oriented version of C that is based on the C grammer. C++ also has several (let's call them) features that are not a part of C. A C++ compiler will compile C code but not the other way around. A C compiler cannot compile C++ code. You might check out the two links below and see if they might help you out. For simplicity sake, I would look for a C compiler alone.
Have fun programming.
Reply:Yes, C++ compilers have support for C++ language extensions, including classes and templates. C is just a subset of C++, so with most C++ compilers you can write regular C code and it compiles fine. I don't think anyone even makes C-only compilers anymore, so I would just get the C++ one (MS Visual C++ Express is free....).
Reply:The difference is in the methods used to code a program. C++ is an object oriented language. You can think of this somewhat by looking at a car. A car has parts, such as an engine, gas tank, transmission, wheels, etc. You define each component well, especially the points of interaction, and let the parts communicate with each other ... the car will go.
C is a procedural language. If you want the car to go, you describe each action specifically and in order.;.. i.e. place the key in the slot in the door. Turn right to unlock the door remove the key. lift the door handle and pull the door toward you. Get in the seat. Close the door. Put the key in the ignition. Turn the key .... and on and on.
Most, if not all C compilers will comfortably compile pure C code, as C++ is basically an extension of C. Too, some C compilers use some of the convenience of C++, but they cannot compile C++ code.
C++, if you learn it is a very marketable skill. The C family of languages is quite fast and powerful. Straight C code will typically run faster than C++ simply because it has less overhead. Some say that straight C is more error prone, with memory leaks more likely. Still, if you practice good coding skills, your programs will be quite reliable.
Reply:get the C++ compiler it is backwards compatible with C. C++ has advance functions that can be used in applications and is what you will be using since virtually all applications are written in C++
Reply:Released in 1985, C++ is an object-oriented programming language created by Bjarne Stroustrup. C++ maintains almost all aspects of the C language, while simplifying memory management and adding several features - including a new datatype known as a class (you will learn more about these later) - to allow object-oriented programming. C++ maintains the features of C which allowed for low-level memory access but also gives the programmer new tools to simplify memory management.
Reply:Most C++ compilers will also compile C programs.
C compilers will not compile C++ object code since C is not an object oriented language.
If you're starting out try using the free version of Microsoft's compiler:
http://msdn.microsoft.com/vstudio/expres...
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment