Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

C and C++ difference? 1

Status
Not open for further replies.

glaserc

Programmer
Feb 16, 2001
34
US
Dear all,
Just how different is C++ than C? I want to learn C++, will it take me a long time if I know C down cold? Thanks.
glaserc
 
C will help you to start with C++.
But some people think that knowledge of C can direct you in wrong way of using C++. It is possible to use C program architecture in C++, but in this case you can missed some C++ advantage. Pay more attention to the examples of C++ program architecture.
 
glaserc,

> Just how different is C++ than C?

Very different. Some people have a difficult time transitioning from procedural programming to Object Oriented Programming. There is no way to generalize the transition accross many individuals. Each person will find their own way, or not.

In my case I found the transition to be very natural.

Good luck
-pete
 
I agree, they are quite different. This difference is becoming more and more pronounced as time goes on and C++ is really developing into its own language, as opposed to being a "superset of C."

C++ provides support for object-oriented programming where C does not. That's not to say that you can't use object-oriented techniques in C -- you absolutely can, but it's quite tough and the result probably won't be very pretty.

C will help you with C++. You won't be tripped up by the dynamic memory management aspects of C++ and you'll be better able to focus on all the stuff that sets the languages apart, also much of the syntax is identical. If you're not familiar with C AND you've never been exposed to OOP, C++ will probably be tough for you though. If this is the case, you may want to consider taking a different route to C++ (like learning C and/or learning a different OOP language first, like Java).

HTH,

Russ
bobbitts@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top