Amiga.org

Coffee House => Coffee House Boards => CH / Science and Technology => Topic started by: Oliver on November 09, 2008, 02:03:06 PM

Title: C++ programming books
Post by: Oliver on November 09, 2008, 02:03:06 PM
Hi folks,

I have started a new job recently, have found my self needing to learn C++ programming, and am looking for advice on good learning resources.

The sole software developer in my department has just resigned, and I have been asked to take over a section of his job. I have previously done some ANSII C programming, and Java programming in uni, but not for a while, and not really to the extent of a software engineer/programmer. My recent programming experience is more in assembly, and most of my (limited) experience is in hardware.

I will be developing applications and drivers for Windows CE based embedded systems.

My plan is to spend some time learning C++ in a general way, before delving into the application.

I am looking for at least one good printed text, from which to base most of my work, and will of course use online references as well. I think finding good online references should be easy enough, but if anyone could recommend some really good books, that would be much appreciated.

Cheers,

Oli
Title: Re: C++ programming books
Post by: countzero on November 09, 2008, 02:16:15 PM
well the first book (and probably you don't need another one) that comes to mind is The C++ Programming Language (http://www.amazon.com/C-Programming-Language-Special-3rd/dp/0201700735/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1226239990&sr=8-1) from Bjarne Stroustrup (http://en.wikipedia.org/wiki/Bjarne_Stroustrup), the guy who made C++.
Title: Re: C++ programming books
Post by: Oliver on November 09, 2008, 02:30:44 PM
Hi countzero,

Thanks for your reply. I will definitely track that one down. I guess that is to C++ what The C Programming Language, Kernighan & Ritchie is to C.

Cheers mate,

Oli
Title: Re: C++ programming books
Post by: Karlos on November 09, 2008, 03:28:22 PM
Another vote for Bjaarne Stroustrup here. It's all you need for the language standard itself.

A book that might be useful for your specific needs is C++ Programming for Technology (http://www.amazon.com/C-Programming-Technology-Cooper/dp/0766814076/ref=sr_1_4?ie=UTF8&s=books&qid=1226244418&sr=1-4)
Title: Re: C++ programming books
Post by: bloodline on November 09, 2008, 03:35:37 PM
Google: "Thinking in C"

Great book and free too.
Title: Re: C++ programming books
Post by: Oliver on November 10, 2008, 03:43:57 AM
Hey, thanks a lot guys.

@Karlos: Your reference looks like it will have qute relavent examples for my use, thanks.

@Bloodline: I have just downloaded a couple of Bruce Eckle's texts, and am reading one over lunch. Cheers!

I'll see if I can pick up some cheap hard copies from Amazon.

Oli
Title: Re: C++ programming books
Post by: Oliver on November 10, 2008, 02:22:42 PM
Just in case anyone else is has interest in this material, I have also been recommended to look into Microsoft Press publications, for Windows CE applications.

I am going to sign up for MSDN membership: hopefully some of these publications will be freely available.

Thanks again,

Oliver
Title: Re: C++ programming books
Post by: Speelgoedmannetje on November 10, 2008, 06:07:07 PM
Quote

Oliver wrote:
I am going to sign up for MSDN membership: hopefully some of these publications will be freely available.
Though I've got bad experiences with embedded windows, MSDN is really helpful :-)
Title: Re: C++ programming books
Post by: Oliver on November 11, 2008, 02:05:10 AM
Hi Speelgoedmannetje,

What kind of bad experiences would they be? Have you previously done development for embedded Windows?
Title: Re: C++ programming books
Post by: Speelgoedmannetje on November 11, 2008, 11:44:52 AM
Yeps,
Well, the experiences were the usual: (minor) stability and performance issues, and some parts of the system seemed to be incomplete.
Title: Re: C++ programming books
Post by: Oliver on November 11, 2008, 01:47:16 PM
Hmm, the incompleteness sounds a bit like what my co-worker has just discovered today.

I think this should be an interesting learning experience.
Title: Re: C++ programming books
Post by: Speelgoedmannetje on November 11, 2008, 02:18:53 PM
Quote

Oliver wrote:
Hmm, the incompleteness sounds a bit like what my co-worker has just discovered today.

I think this should be an interesting learning experience.
Well I also discovered some incompleteness also in Java libraries, but less.
I just don't like to work with something shoddy.
Considering embedded applications, I much prefer Linux in combination with C/C++.
Title: Re: C++ programming books
Post by: Caius on November 17, 2008, 10:40:10 AM
Like many others in this thread I too recommend Stroustrup's book. However I do not agree that this should be the first book you look into. What this book does is to cover the specifics of C++. I use it when I need details like how types are resolved when instancing template classes and functions, when variables are initialized and not (a rule of thumb in C++ is to always initialize variables), scoping rules, etc. But it's not as useful for how to put everything together in a larger context.

When I started with C++ I used "C++ - How to Program" (Deitel). This book covers most (but not all) aspects of the language, and the exercises are very good. Many books start out with covering C topics, then move on to C++. In my opinion this is not a good idea, because when using C++ you need to change how you think. This book will teach you C++ from the beginning.

C++ is full of pitfalls and weird details. When you want to learn using the language in a more optimal way, I recommend "Effective C++" (Scott Meyers). This book is often referred to as the "first second book you need". Every C++ programmer should have this. It covers common errors when using constructors, resource management, inheritance, templates, and many other things. All topics are very specific, and can be used in your code directly.

At this point you may want to get "Design Patterns - Elements of Reusable Object-Oriented Software" (Gamma, Helm, Johnson, Vlissides). This book is THE classic for design patterns. Whenever you see mention of "Gang of Four" or "GoF", it refers to this book. Also, unlike most other books on the topic, most examples are in C++ (and SmallTalk in a handful of cases).

The STL (Standard Template Library) includes a plethora of useful containers and algorithms. So many in fact, that it's hard to choose the right ones for the problem at hand. Again by Scott Meyers I recommend "Effective STL". It helps you choose the right tools for working on ranges of objects, including searching, sorting, deleting, etc. You'll get a better understanding of how to achieve the optimal blend of speed and error-free operation.

C++ is a big and expressive language. It's unrealistic for any one person to learn everything about it (at least in one lifetime). And while personal experience is the best teacher, the above books will speed up your progress considerably.
Title: Re: C++ programming books
Post by: Oliver on November 18, 2008, 03:23:35 PM
Hi Calus,

Thanks for sharing your input on this; much appreciated.

I noticed those books you mentioned when scouring around for resources, and thought they looked good; it's great to have a user's opinion of them too.

I do like to have a range of texts to draw upon as well.

I will be trying to use most of these books in the near future. Hope I can find some in a library.

Cheers,

Oli
Title: Re: C++ programming books
Post by: Phantom on November 26, 2008, 03:15:22 PM
If you are new I recommend "Learn C++ in 21 days" for a start. Bjarne's book is the last one you have to buy, because it's little hard to read if you don't know the basics.
Title: Re: C++ programming books
Post by: Oliver on November 27, 2008, 12:50:31 PM
Quote
Phantom wrote:
If you are new I recommend "Learn C++ in 21 days" for a start. Bjarne's book is the last one you have to buy, because it's little hard to read if you don't know the basics.


Thanks mate.
Title: Re: C++ programming books
Post by: bloodline on November 27, 2008, 02:05:17 PM
After recomending Thinking in C, I decided to give it a quick look over again and remembered just how good a set of books it is :-)

It might be a little basic for you but www.friedspace.com has some nice stuff on it for the C adventurer...
Title: Re: C++ programming books
Post by: Oliver on November 28, 2008, 10:00:52 AM
Hi Bloodline,

Thanks for posting back with further details. I'm having a go at the friedspace tutorials now.

Cheers,

Oli
Title: Re: C++ programming books
Post by: bloodline on November 28, 2008, 01:03:17 PM
Quote

Oliver wrote:
Hi Bloodline,

Thanks for posting back with further details. I'm having a go at the friedspace tutorials now.

Cheers,

Oli


That particular article has a great intro to SDL, which IMHO is the best thing to happen to the world, ever :-)

Seriously, without SDL I would never have been able to move away from the Amiga as my main developing platform ;-)