Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jan 22nd, 2005, 3:51 PM   #1
Xero
Hobbyist Programmer
 
Join Date: Dec 2004
Location: a cardboard box
Posts: 118
Rep Power: 4 Xero is on a distinguished road
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?
__________________
...
Xero is offline   Reply With Quote
Old Jan 22nd, 2005, 5:05 PM   #2
Broax
Hobbyist Programmer
 
Broax's Avatar
 
Join Date: Jan 2005
Location: Porto, Portugal
Posts: 142
Rep Power: 4 Broax is on a distinguished road
Send a message via MSN to Broax
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
Broax is offline   Reply With Quote
Old Jan 22nd, 2005, 5:11 PM   #3
Mjordan2nd
The Supreme Ruler
 
Join Date: May 2004
Location: Houston
Posts: 1,476
Rep Power: 6 Mjordan2nd is on a distinguished road
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
Mjordan2nd is offline   Reply With Quote
Old Jan 22nd, 2005, 8:05 PM   #4
Xero
Hobbyist Programmer
 
Join Date: Dec 2004
Location: a cardboard box
Posts: 118
Rep Power: 4 Xero is on a distinguished road
but are there any benifits of C over C++?
__________________
...
Xero is offline   Reply With Quote
Old Jan 22nd, 2005, 9:08 PM   #5
Mjordan2nd
The Supreme Ruler
 
Join Date: May 2004
Location: Houston
Posts: 1,476
Rep Power: 6 Mjordan2nd is on a distinguished road
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
Mjordan2nd is offline   Reply With Quote
Old Jan 22nd, 2005, 10:32 PM   #6
Tama
Programmer
 
Join Date: Dec 2004
Posts: 35
Rep Power: 0 Tama is on a distinguished road
>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.
Tama is offline   Reply With Quote
Old Jan 22nd, 2005, 11:45 PM   #7
bl00dninja
Programming Guru
 
bl00dninja's Avatar
 
Join Date: Oct 2004
Location: namespace std
Posts: 1,246
Rep Power: 5 bl00dninja is on a distinguished road
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.
bl00dninja is offline   Reply With Quote
Old Jan 23rd, 2005, 12:23 AM   #8
thechristelegacy
Expert Programmer
 
thechristelegacy's Avatar
 
Join Date: Jul 2004
Location: Somerset, Pa
Posts: 708
Rep Power: 5 thechristelegacy is on a distinguished road
Send a message via AIM to thechristelegacy Send a message via MSN to thechristelegacy
c++ is much more OOP and it has features that it takes years to fully understand.
thechristelegacy is offline   Reply With Quote
Old Jan 23rd, 2005, 8:12 AM   #9
bl00dninja
Programming Guru
 
bl00dninja's Avatar
 
Join Date: Oct 2004
Location: namespace std
Posts: 1,246
Rep Power: 5 bl00dninja is on a distinguished road
Quote:
shit, i have to crossmatch six units of blood for the e.r. now, catch ya'll later...
that stupid b#*%h in the e.r. was fine. i wasted like an hour crossmatching all that blood when i could have been playing dynomite on
www.popcap.com
__________________
i put on my robe and wizard hat...

Have you ever heard of Plato, Aristotle, Socrates?...Morons.
bl00dninja is offline   Reply With Quote
Old Jan 23rd, 2005, 11:11 AM   #10
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,467
Rep Power: 8 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
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."
Infinite Recursion is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 1:03 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC