saqib431 0 Report post Posted July 23, 2007 Hi there all. Can somebody tell me about C and C++? I mean whats the difference between C language and C++? I have used C , but once i used C++ I am a little bit confused about there compilers. i hav'nt got any difference between them. But people says that they are different from each other. Plz help me to get out of this confusion! Waiting for your responce... Share this post Link to post Share on other sites
Tetraca 0 Report post Posted July 23, 2007 C is the language that was created to help create UNIX. It is a language that is close to assembly, but not quite assembly - it's a medium level programming langauge. It's good for if you really want to get every last bit of performance out of your application without resorting to using assembly, but you'll end up having to juggle memory - great for making operating systems but sometimes tedious when trying to make applications. C++ is the language created based off of C. It is a higher level programming language and introduces object-oriented programming. Because of this, it is harder to create something like UNIX as it manages memory for you, but it's not completely impossible, as BeOS was written with C++. I personally like C over C++ because I'm not an object-oriented programmer, and C seems less confusing and more uniform in syntax than C++. iostream.h just ticked me off because it uses completely different syntax to do simple tasks. Where did ">>" come from? If that is supposed to represent a Germanic double arrow quotation mark why do you still need to use English dash quotes? Why can't you just use the same simple function syntax from its predecessor?Each compiler for the langauge is different - and have slightly different syntaxes to do the same thing if you are going outside ANSI standard libraries like stdio and stdlib. GNU GCC is more oriented towards *nix systems and so its syntax and libraries reflect that. It's free and tries to be as compliant as possible with standards. Visual C++ (also compiles C) has a syntax that is more in the Microsoft style of dumping standards and making their own - at least in some previous versions. I don't know if .NET is any less standards bending. Borland compilers are okay, though the DOS versions have bent syntax in order to speed up compiling time. Share this post Link to post Share on other sites
fffanatics 0 Report post Posted July 23, 2007 C and C++ are almost identical. The reason is the C++ is the newer extended version of C. C++, as already stated, is an object oriented langauge unlike C. The reason this is a good thing is that you can organize your programs more effectively and allow them to be updated without changing code for other "objects". This leads to less development costs for maintained a piece of software. If you are a beginner programmer, start out learning C and then the transition to more advanced topics in C++ will be much easier. I personally use C++ for all my development needs (which include writing personalized software and games) except for file parsing just because i like how java does this so easily. As for compilers, there are different compilers for both C and C++. Most C programs can be compiled in C++ but it depends on what libraries and functions you are including. I use Visual C++ for my development since i am a windows user but when i am writing software for / on a linux pc, i use g++. Share this post Link to post Share on other sites
Codemaster Snake 0 Report post Posted August 6, 2007 C is structured , C++ is Object Oriented.You can see C as a Subset of C++. C++ hosts every feature of C with some added freatures like:* Classes* OOP Features* Better Error Handling* More Data securityetc... Share this post Link to post Share on other sites
longtimeago 0 Report post Posted August 31, 2007 hi friends this is the place where many of them get confused , regarding the diffrence between c and c++ , i want to make it clear to you. The main diffrence between c and c++ is that c is a procedural oriented programming where as c++ is an object oriented programming . in c++ we can also do procedural oriented programming, that means we can call that c++ is a procedural oriented programming as well as an object oriented programming. So almost all the professinals preffer c ++ because the Object oriented programming has its own advantages.The main advantage is reusablity. but no one should forget that C is the basic of c++ . Hope you got to know the diffrences clearly friends. Share this post Link to post Share on other sites
sealence 0 Report post Posted September 3, 2007 c++ = c + Object oriented + ...read the book <thinking in c++> and it will tell you more. :XD: Share this post Link to post Share on other sites