Just a general question, should C be learned before C++?
Thanks
Just a general question, should C be learned before C++?
Thanks
not necessary. C++ is the extended script of C.
Basically, the data type, looping, decision, etc concept are similar. The main difference is the C++ introduced OOD while C is procedural programming.
gogo
What makes C++ dýfferent is the object oriented design but for the beginners understanding and programming in OOP is somewhat difficult. You have to think in a larger perspective if you want to write nice programs. Therefore it would be nice to know some amount of C before going into C++. (at least basics, you don't need to go deep into C I/O much for example).
Actually, I think learning OOP is easier if you don't entrench yourself into procedural thinking.
personally i think that you should learn C before C++. the reason for this mainly is because in c++ too much is already done for you that you dont necessarily need to understand. for instance anyone with any basic knowledge of c++ and stl can use a stl map. If you haven't learnt c could you write that map class? would you know how to implement a map as a balanced binary tree? well if you had learnt c before c++ you would know how to do this because in c you construct these data structures yourself.
c is for understanding.....
c++ is for more rapid development of c apps.
if you think about it this way and you want to be a good programmer who really understands what your doing then you will see the value of learning c. If on the other hand you just want to code for fun and have no aspirations of becoming a good programmer then start with c++. This is harder to learn than c but it is easier to use effectively.
Free the weed!! Class B to class C is not good enough!!
And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi
I disagree, I can both make an AVL tree and a hashmap, and I've never used used malloc, or whatever the C equilivent for dynamic memory allocation is.
That said, living behind abstraction is not a bad thing. I definetely could not have written the DirectX API, should that make me not use it?
If you start by learning C++ you will basically be learning C.
You will use some different I/O functions and memory allocation functions but C++ is an addition to C.
I started with C++ and learned C shortly after.
The difference really starts when you start in on classes.
That's really what C++ is: C with classes.
In short, just pick one to start with and learn both.
Once you learn one of them, any other language comes very quickly.