![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Hobbyist Programmer
Join Date: Dec 2004
Location: a cardboard box
Posts: 118
Rep Power: 4
![]() |
What is the difference between C and C++?
Ive never programmed in C before. How much different is it from C++ and the different applications its more commonly used for?
__________________
... |
|
|
|
|
|
#2 |
|
Hobbyist Programmer
|
as far as I know C++ is more OO and therefore more easy then C... but who am I to say anything? I can barely pogram more then your nick... ;
But I see that these ziggys are catching up in here.. lol
__________________
PORTUGALPORTUGA PORTUGALPORTUGA PORTUGALPORTUGA PORTUGALPORTUGA PORTUGALPORTUGA |
|
|
|
|
|
#3 |
|
The Supreme Ruler
![]() Join Date: May 2004
Location: Houston
Posts: 1,476
Rep Power: 6
![]() |
Yup. It's more OO.
__________________
"Every gun that is made, every warship launched, every rocket signifies, in the final sense, a theft from those who hunger and are not fed, from those who are cold and are not clothed. The world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children." - Dwight D. Eisenhower |
|
|
|
|
|
#4 |
|
Hobbyist Programmer
Join Date: Dec 2004
Location: a cardboard box
Posts: 118
Rep Power: 4
![]() |
but are there any benifits of C over C++?
__________________
... |
|
|
|
|
|
#5 |
|
The Supreme Ruler
![]() Join Date: May 2004
Location: Houston
Posts: 1,476
Rep Power: 6
![]() |
I'm not positive on this, so don't take my word for it, but I believe that C code is a little faster, at least in it's basic form. C does math and stuff faster.
__________________
"Every gun that is made, every warship launched, every rocket signifies, in the final sense, a theft from those who hunger and are not fed, from those who are cold and are not clothed. The world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children." - Dwight D. Eisenhower |
|
|
|
|
|
#6 |
|
Programmer
Join Date: Dec 2004
Posts: 35
Rep Power: 0
![]() |
>How much different is it from C++
It depends on how you use C++, how you use C, and what features unique to either you stick to. C and C++ can be virtually identical, or completely different. >but are there any benifits of C over C++? The only way to answer that question is to learn them both thoroughly, use them both for projects, and then come to your own conclusion. |
|
|
|
|
|
#7 |
|
Programming Guru
![]() Join Date: Oct 2004
Location: namespace std
Posts: 1,246
Rep Power: 5
![]() |
like the idea of "inheritance" C++ is a "superset" of C, not neccessarily something completely different. although it has some different basic libraries you can go ahead and use <stdio.h> in a C++ program if it strikes your fancy. you can write C code in C++. OOP is more for real-world abstraction and code-reusability. ever notice how in a particular video game series, there may be striking similarites between a lot of the sequels (how the player moves, etc.) all they had to do was use the old code for those objects, which by the nature of C++ was simpler to do than it would have been had those object been written procedurally in C, where the separation between the piece of code that you want to use again might not have been quite as well-defined. it's a lot easier to just grab the file that has the "bad guy" class, and make minor changes to their apperance or behavior, then hunt through thousands of lines of code for the functions and crap that would have made them act that way. shit, i have to crossmatch six units of blood for the e.r. now, catch ya'll later...
__________________
i put on my robe and wizard hat... Have you ever heard of Plato, Aristotle, Socrates?...Morons. |
|
|
|
|
|
#8 |
|
Expert Programmer
|
c++ is much more OOP and it has features that it takes years to fully understand.
|
|
|
|
|
|
#9 | |
|
Programming Guru
![]() Join Date: Oct 2004
Location: namespace std
Posts: 1,246
Rep Power: 5
![]() |
Quote:
www.popcap.com
__________________
i put on my robe and wizard hat... Have you ever heard of Plato, Aristotle, Socrates?...Morons. |
|
|
|
|
|
|
#10 |
|
Programming Guru
![]() ![]() ![]() |
Anything in C, you can do in C++ but with more overkill.
__________________
http://jasonpowers.net "There are a thousand hacking at the branches of evil to one who is striking at the root." |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|