Best Way/Book/Web site to start learning C++?

From Visual Basic to GNU C, this is the place to talk programming.

Moderators: SecretSquirrel, just brew it!

Best Way/Book/Web site to start learning C++?

Postposted on Thu Dec 06, 2007 10:39 pm

Hey all, I'm taking a C++/RESOLVE programming course (CS&E 221) at my university next quarter, and I wanted to get a head start on learning C++, mostly so that it'll be easier to get that A in there, and also just to give me something to do during my winter break. There is no textbook listed for the class, at least not yet, so I was wondering if anyone here could recommend me either a book (that doesn't cost a whole lot), or a good web site to read/use to learn C++, at least a little bit of it. So please, fire away.
Gigabyte Z77-DS3H | Core i7 3770 | 2x8 GB Crucial Ballistix DDR3-1600| Samsung 830 128GB SSD | Gigabyte HD7950 3GB | Win 7 Pro x86-64
CampinCarl
Graphmaster Gerbil
 
Posts: 1311
Joined: Mon Jul 04, 2005 8:53 pm

Postposted on Thu Dec 06, 2007 10:55 pm

The O'Reilly books are really good. I don't know about their C++ books in particular, but what I've read for other things , they're well written and a few of the books actually include the creator of the programming language or software to some extent.
The best things in life are free.
http://www.gentoo.org
Guy 1: Surely, you will fold with me.
Guy 2: Alright, but don't call me Shirley.
titan
Grand Gerbil Poohbah
 
Posts: 3276
Joined: Mon Feb 18, 2002 6:00 pm
Location: Great Smoky Mountains

Postposted on Thu Dec 06, 2007 10:58 pm

Do you know any programming at all? If you just need syntax, something like O'Reilly or Learn C++ in 24 hours or whatever ought to get you started, but I'd recommend just waiting for the class to begin. *shrug*

It's also possible that you can find the course material for a class online -- one of the big-name schools (Harvard? MIT? Carnegie Mellon?) publishes a lot of their stuff online for free use.
Core i7 920, 3x2GB Corsair DDR3 1600, 80GB X25-M, 1TB WD Caviar Black, MSI X58 Pro-E, Radeon 4890, Cooler Master iGreen 600, Antec P183, opticals
SNM
Emperor Gerbilius I
 
Posts: 6206
Joined: Fri Dec 30, 2005 9:37 am

Postposted on Thu Dec 06, 2007 11:26 pm

Just don't start from a C perspective. That will put you at a disadvantage if you try to hang onto the C-ness of C++ while trying to learn the object-oriented paradigms. Better to just start with C++ or with Java or something similar.
Buub
Maximum Gerbil
Silver subscriber
 
 
Posts: 4175
Joined: Sat Nov 09, 2002 10:59 pm
Location: Seattle, WA

Postposted on Thu Dec 06, 2007 11:36 pm

For books and web sites, I dug up 2 threads for you:

viewtopic.php?t=37264
viewtopic.php?t=32371
Image
The Model M is not for the faint of heart. You either like them or hate them.

Gerbils unite! Fold for UnitedGerbilNation, team 2630.
Flying Fox
Gerbil God
 
Posts: 24140
Joined: Mon May 24, 2004 1:19 am

Postposted on Thu Dec 06, 2007 11:52 pm

Buub wrote:Just don't start from a C perspective. That will put you at a disadvantage if you try to hang onto the C-ness of C++ while trying to learn the object-oriented paradigms. Better to just start with C++ or with Java or something similar.

From an OO design perspective and a cleanliness/stylistic perspective, I totally agree. I mean, there's little uglier than half-breed C++ using stdio and no real OO structure. However, from another perspective, I think knowing C gives you an advantage in understanding why certain things are the way they are -- like the difference between objects allocated on the stack and on the heap, which is not an issue in any other OO languages students are likely to use (or refs versus pointers, or language strings versus STL strings, or issues associated with manual storage management, etc.).

Really this goes to the core of why I think C++ is not a very good language for learning programming. Ugliness caused by the fact that it had this hard design constraint of strong compatibility with C always pokes through and shatters the otherwise higher-level veneer. IMO, you have this ugly choice: come from C and they understand the low-level stuff that makes C++ somewhat quirky, but like you said, maybe they are hobbled by hanging on to a very procedural mindset and not embracing the higher-level C++ functionality. Come from Java or Smalltalk and they do the OO stuff well, but then they get smacked in the face by weird gotcha issues that are a byproduct of the fact that C++ is layered on C without really hiding it.
bitvector
Grand Gerbil Poohbah
 
Posts: 3234
Joined: Wed Jun 22, 2005 3:39 pm
Location: Mountain View, CA

Postposted on Fri Dec 07, 2007 11:41 am

bitvector, I agree it's nice to know those things, but I think if you're going to learn to do C++ really well, it's fine to learn those things after you learn the proper C++ paradigms which don't really mesh well with C.
Buub
Maximum Gerbil
Silver subscriber
 
 
Posts: 4175
Joined: Sat Nov 09, 2002 10:59 pm
Location: Seattle, WA

Postposted on Sat Dec 08, 2007 8:55 am

Hmmm...interesting. Well, I do have some previous experience. Some VB and Java...though I have to admit, the Java is limited to only slightly more than what we did in our AP Computer Science class last year in high school. Couple that with the fact that I haven't programed much since then...well, I'm a bit rusty.

So, I guess as far as previous coding experience goes, I've got relatively nothing.

I'd totally forgotten about checking MIT/Stanford/Harvard's sites, because I used to watch those for fun...my dad found a bunch of random videos of lectures on MIT's website somewhere and was showing them to me. I'll do that, and also maybe pick up one of those recommended books. Thanks guys.
Gigabyte Z77-DS3H | Core i7 3770 | 2x8 GB Crucial Ballistix DDR3-1600| Samsung 830 128GB SSD | Gigabyte HD7950 3GB | Win 7 Pro x86-64
CampinCarl
Graphmaster Gerbil
 
Posts: 1311
Joined: Mon Jul 04, 2005 8:53 pm


Return to Developer's Den

Who is online

Users browsing this forum: No registered users and 1 guest