PDA

View Full Version : learning C++


dm2243
08-11-2002, 01:46 PM
Can anyone suggest a good teach-yourself C++ book that I can use with OS X?

"Sams Teach Yourself C++ in 21 Days" gets good reviews at Amazon and elsewhere -
but I worry that it may be too windozy for my purposes.

"Learning Cocoa with Objective-C" is obviously an OS X book - but I worry that
it might not be good for a first-time programmer (in addition to being on Obj C and not C++).

thoughts? suggestions? thanks!
dm

nkuvu
08-11-2002, 02:10 PM
I personally avoid the "learn in X days" series unless I am pretty familiar with things already.

Are you a programmer? Do you program on object oriented design? If so, the 21 days might work out.

If you've never programmed before, get a more comprehensive book. There are concepts in object oriented design (such as classes and inheritance) which can be confusing to a new programmer.

And I am sure there are C++ books written by O'Reilly. And since I always recommend O'Reilly...

They're pretty good at not making the books to Windowsy -- most of the time they write from a Unix standpoint, which is just fine for OS X.

mervTormel
08-11-2002, 02:15 PM
do you know C ? if not, get the K&R bible, The C Programming Language, also.

it depends on what your goals are. do you want to write portable apps, or just develop in apple's project builder?

i'd avoid C++ and go straight to Obj-C as skills there would be transferable to other incarnations of the language.

as for the Sams book, i found it particularly hoary, but that was some time ago.

Sams "teach yourself ANSI C++" in so many days is a non-denominational approach. i don't think it even mentions a particular platform.

--
The C students run the world. - Harry S Truman

The C++ students break it. - Rusty Shackleford

Craig R. Arko
08-11-2002, 04:46 PM
I've always found it useful to pick up two volumes with different approaches and lots of examples, as well as a language reference manual, when trying to learn a new programming language.

Also, it's wise to have some good documentation on the specific environment you'll be using, in this case I assume Project Builder, CodeWarrior, or the Darwin make environment. You can find this (except for CodeWarrior) at the Apple Developer site.

dm2243
08-11-2002, 05:57 PM
thanks folks!

to answer merv's and nkuvu's questions: (1) i know a little basic but no C. (i realize that basic barely qualifies as a programming language, but i'm also hoping that my logic and set theory skills will translate into C++ programming.) at any rate, i'm hoping to avoid C and go straight to C++. (2) i would like to be able to write portable apps.

based on your comments, it seems that O'Reilly's "Practical C++ Programming" (1995) might be one good choice (according to oreilly.com, it is "A complete introduction to the C++ language for the beginning programmer..."). should i worry about it being seven years old, however?

I guess the second book should be more of a reference book, such as "The C++ Programming Language" by Bjarne Stroustrup (1000 pages...), yes?

nkuvu
08-11-2002, 06:50 PM
I wouldnt' worry about it being 7 years old -- C++ doesn't change very fast.

And you're looking to learn the basics, which haven't changed in quite a while.