Jump to content
  • Advertisement

Archived

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

TheSimplerOne

Learning C++, about C

This topic is 5729 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

I was reading on Amazon and they had a person give a list of books that would take you from C to C++ on to game programming. I was wondering if there is any reason to learn C before C++ or what some good sites to build my knowledge on either of these might be. Thankyou

Share this post


Link to post
Share on other sites
Advertisement
Now, most people will say "Go for C++". ...That's because they don't know. You really should learn C before C++ because C books have more details on the basics/basic techniques without going into the overhead of OOP. Alot of people say, "It too god-damn hard to move from C to C++". It's not that hard, really. Alot of C++ professionals have all the great C books. Hell, even Stroustrup the man himself said that you should learn C first. Do it or die.

EDIT: typos
Hey amigo, I am a coderito sitting in your borito(and cuttin')

[edited by - Fucho on November 5, 2002 11:45:34 PM]

Share this post


Link to post
Share on other sites
Where does Stroustrup say that you should learn C before C++? If I read his books correctly, and his website's FAQ, he says the exact opposite... No you should not bother learning C before C++. Going back and reading the C 89 and C99 standards after learning C++ doesn't hurt though, and that I recommend. You just need to know the differences between the 3. A good book to begin with is Accelerated C++. That'll get you a strong base of knowledge, one that'll need to be extended by design books, more in-depth STL and template-related books, and eventually, or during the same time, graphics theory and alike.

[edited by - aggregate on November 5, 2002 11:56:14 PM]

Share this post


Link to post
Share on other sites
I swear I read an article somewhere that talked about the differences between C and C++. It read something like:
"Should you learn C before C++? Stroustrup thinks so..."
I just spent 30 minutes trying to find it and failed...

Maybe I need to keep my mouth shut.

Hey amigo, I am a coderito sitting in your borito(and cuttin'')

Share this post


Link to post
Share on other sites
I don''t think it really matters where you start, as long as you eventually come to understand paradigms like OOP. I myself started in qbasic, then moved straight to C++. It was rather easy, actually.

In qbasic, there are basically no function calls or parameters. Therefore pretty much everything has to be global (bad). As I read into programming, I learned that globals were bad (hard to manage). I didn''t know how I could do that in qb, so I looked into other languages. I looked at C, but it seemed like I would still have to pass a whole bunch of parameters around all the time to get it to work.

Then I looked into C++. Classes seemed like a way to use globals (public members), without them being "global", so I decided to go with C++. Of course, I learned that making everything a public member was bad, so I made things private. Private members were basically global to the class, and as long as the class was the only thing that used those variables, I had my globals back, "The Right Way"(tm).

Later on, encapsulation, data-hiding, and polymorphism came naturally to me, because I understood the basic idea. So, even though I started in qbasic and programmed with it for probably 1 1/2-2 years, I was able to grasp the concept of C++.

Maybe not all are like me, but I say to start with whatever seems easiest to you. If you enjoy programming (which is hard to do if you think the language you''re learning is difficult), you''ll eventually venture into other languages and better paradigms. If you started in an ugly language (basic, etc), you''ll learn that OO is easier. If you started in an OO language, you''ll learn you made the right choice.

So, just have fun with programming; that will help more than choosing the "perfect" language to start with.

Share this post


Link to post
Share on other sites
I had gone through C before C++. It''s not a case of having to learn C before C++, or not learn C before C++, it''s a case of if you have had the benefit of knowing C before C++ then learning C++ will be accelerated.

I beleive that ultimately, whether you know C beforehand, they will be as good as each other.

Sometimes people forget that C++ is a language in itself.

Peace out,
Mathematix.

Share this post


Link to post
Share on other sites
Having a background in C would be useful, however starting from scratch. I would recommend learning C++. Learning C alone is learning features which have features/aspects which have been improved. If on the other hand, you are learning as a hobby/interest. You may find it interesting how the language evolved by going through the subset. If you can afford to purchase books on each subject go ahead (Although there are some books which explain both). I personal have a large collection of books. It is surprising how much you can learn without tutoring (Imagine how much it would cost for education bills).

*Note* Fucho obviously thinks Stroustrup doesn''t understand C++.

Share this post


Link to post
Share on other sites
________________________________________________________________
From: stroustr@cs.tamu.edu
To: Fucho77 < fucho77@hotmail.com>
Subject: Re: Learn C before C++?
Date: Wed, 6 Nov 2002 09:11:13 -0600

________________________________________________________________

Quoting Fucho 77 < fucho77@hotmail.com>

> Hello,
>
> Us C/C++ programmers over here at www.gamedev.net are wondering if you
> recommend learning C before C++? Yes I know it sound dumb.
>
> Thank you for your time
>

I recommend learning C++ before C. There is a brief argument in my FAQ and a
more detailed one
in my paper "Learning Standard C++ as a New Language" which you can download
from my home
pages.

bjarne

________________________________________________________________

Well alright. I was wrong.

EDIT: tags
Hey amigo, I am a coderito sitting in your borito(and cuttin')

[edited by - Fucho on November 7, 2002 1:33:38 PM]

Share this post


Link to post
Share on other sites
Ok well I''ll read C++ Primer Plus then. I don''t know where I''ll go after that but...I have time. Thanks everyone, if you want to post URLS of good tutorials for either of the languages that would be nice. Bye

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!