Learning C++

Not about OpenMW? Just about Morrowind in general? Have some random babble? Kindly direct it here.
Post Reply
safferli
Posts: 14
Joined: 06 Aug 2011, 23:06

Learning C++

Post by safferli » 26 Aug 2011, 15:12

Hi folks!

For reasons that are not important, my girlfriend will do a computer science bachelor degree while still working (at least at first). Now, there is a first-semester "introduction to C++" course she cannot attend, but she can still do the exam. She'll have to learn the C++ basics by herself, obviously.

Now, I remember Zini(?) posting some good online and book recommendations for a beginner to learn C++. With the forum move, I just can't find it any more. Could anyone post helpful hints/links on how to start learning C++? She's a beginner (no other computer languages), but can manage computers quite well. OS of choice is Linux/Ubuntu.

Thanks for the help! :)

User avatar
werdanith
Posts: 295
Joined: 26 Aug 2011, 16:18

Re: Learning C++

Post by werdanith » 26 Aug 2011, 17:00


User avatar
Star-Demon
Posts: 73
Joined: 11 Aug 2011, 03:17
Location: New York
Contact:

Re: Learning C++

Post by Star-Demon » 26 Aug 2011, 21:07

I recommend she takes a C course first.

Good luck, though. Working while going to school in any engineering or applied science field is going to be rough and she'll need your support to take care of things so she can focus and succeed. She'll be steamrolled if she doesn't get her 10000 hours in. They want nothing less - every time.

That being said - the links zini posted are pretty good - I'd also say to check out cprogramming and find released source for old games like Shadow Warrior and study our own source - just to see the complexity in things.
"The scientists of today think deeply instead of clearly. One must be sane to think clearly, but one can think deeply and be quite insane." - Nikola Tesla

User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Learning C++

Post by Zini » 26 Aug 2011, 21:34

I recommend she takes a C course first.
Sorry, no! Among C++ developers it is pretty much universally frowned upon advising people to learn C first as a steppingstone for learning C++. These languages are very different from each other, despite both having a common ancestor (an earlier version of C). Especially if you have never learned a programming language before, learning C before C++ is a particular bad idea.

I think the arguments for C are mostly based on the assumption that C is a subset of C++ (which isn't totally correct). In theory starting with a smaller language and then expanding it with additional material may sound attractive. But actually you have to unlearn a large chunk of your C knowledge and then learn what methods C++ is using instead (which is typically much easier to learn than the C equivalents).

K1ll
Posts: 154
Joined: 06 Aug 2011, 21:54

Re: Learning C++

Post by K1ll » 26 Aug 2011, 22:28

Although or maybe because i'm a C programmer i agree with Zini.

The book is a really good read and it doesn't require one to know C. All needed basics of C that are shared with C++ are described in the book not more and not less.

I haven't done it myself but i highly recommend doing the examples, writing your own little programs with what you've just learned and reading code of programs in the language you learn.

User avatar
Star-Demon
Posts: 73
Joined: 11 Aug 2011, 03:17
Location: New York
Contact:

Re: Learning C++

Post by Star-Demon » 27 Aug 2011, 02:39

C course helped me a lot. Guess it's "different strokes...".
"The scientists of today think deeply instead of clearly. One must be sane to think clearly, but one can think deeply and be quite insane." - Nikola Tesla

safferli
Posts: 14
Joined: 06 Aug 2011, 23:06

Re: Learning C++

Post by safferli » 27 Aug 2011, 19:54

Thanks for the replies so far! The book linked to (Thinking in C++) seems like a good one. Any other tips, what are your favourite books for learning C++?

And learning C is out of the question. It's a required course, and she has to learn C++. Not C, not C first then C++, but C++ ;)

User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Learning C++

Post by Zini » 27 Aug 2011, 22:28

Other often recommended books are:

* C++ Primer
* The C++ Programming Language

I assume you only want beginner's books here? No advanced material?

safferli
Posts: 14
Joined: 06 Aug 2011, 23:06

Re: Learning C++

Post by safferli » 28 Aug 2011, 10:06

Zini wrote:I assume you only want beginner's books here? No advanced material?
Yes, thanks.

Post Reply