starting with c instead of c++
Hmmm, so, heres my problem.
I want to eventually be writing games in c++ once I am done learning everything, but my dad had (he left) like 20 different c language books that would basically teach me anything I would ever want to know about it. I also have the etext for the ibm pc programmers guide to c (i think from this site).
So my problem is that I want to eventually write in c++, but right now I have so many c resources, it seems like a waste to not use them (since i am new to the c language in general)
C++ is supposed to just expand off of c and it changes some of the syntax, correct? so would it be ok if I just went ahead and learned a lot of c, and later on started c++? or would that not be a good plan?
thanks in advance
in my opinion you should not start learning c before c++. Although a LOT of the syntax is the same, it will teach you "bad" habits in the long run (if your gonna be doin c++). Many people have a hard time transitioning from procedural programming to object oriented coding. C encourages procedural coding, so it does kind of hurt you when you move to c++.
Well I think it would be easier to just learn C++ stright away but if you have the books you might as well use them, although some will say you can get into bad habits using C before moving on to C++ but hey!
CEO Plunder Studios
CEO Plunder Studios
If you learn C++ from scratch, then you will also be learning C. Everything you learn in C can be used in C++, but somethings in C++ cant be used in C.
Plus, most C++ books will either first teach you an abbreviated C or will expect you know C.
If you learn C before C++ just make sure to pick some up-to-date documentation on C++ and not rely on "C with classes" documentation. Several ''key'' features of the C++ library have evolved a lot since the arrival of classes.
In particular, remember that C++ standard headers do not have a .h extension.
Other than that, knowledge of the C library is always a good thing to have, even in this C++ world.
Documents [ GDNet | MSDN | STL | OpenGL | Formats | RTFM | Asking Smart Questions ]
C++ Stuff [ MinGW | Loki | SDL | Boost. | STLport | FLTK | ACCU Recommended Books ]
In particular, remember that C++ standard headers do not have a .h extension.
Other than that, knowledge of the C library is always a good thing to have, even in this C++ world.
Documents [ GDNet | MSDN | STL | OpenGL | Formats | RTFM | Asking Smart Questions ]
C++ Stuff [ MinGW | Loki | SDL | Boost. | STLport | FLTK | ACCU Recommended Books ]
I see no harm starting with C, as long as you keep it in the back of your mind that you will make the transition to C++ eventually. I started with C, and I don''t think I picked up any bad habits from it. On the contrary, it serves to distinguish what C++ brings to the mix. I appreciate object-oriented features all that much more, having first lived without them.
hmm
so far I have had 2 "yes, it is ok" replys, 2 "no, don''t do it" replys, and one sort of impartial
so now I am just even more confused than before :\
so far I have had 2 "yes, it is ok" replys, 2 "no, don''t do it" replys, and one sort of impartial
so now I am just even more confused than before :\
I''m still just starting to break the habit''s I got from C. Luckily since C-code works when using C++, it''s not too hard of a hit, and you can gradually slide yourself into the Object-Oriented craze.
I would personnally say: Go straight into C++
------------
aud.vze.com - The Audacious Engine <-- Newbie alert, look at your own risk. Can induce severe laughing fits and other variations of hysterical outburst.
I would personnally say: Go straight into C++
------------
aud.vze.com - The Audacious Engine <-- Newbie alert, look at your own risk. Can induce severe laughing fits and other variations of hysterical outburst.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement