Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

pandabear114

starting with c instead of c++

This topic is 6035 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
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++.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites


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.

Share this post


Link to post
Share on other sites
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 ]

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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 :\

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
ok
since i am not really getting anywhere in my current situation ()
has anyone read c++ in 21 days, and do you think it is a pretty good book for teaching all hte c++ basics if i just went straight into c++ rather than c?

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!