Learning C++

I have been looking on Amazon for a book to teach myself C++ and am wondering if anyone can help?

I have a good understanding of programming, but unfortunately only of relatively obsolete languages and need to learn languages that will be more useful within industry, so I do not need to learn how to program e.t.c, just the C++ language.

From what I can gather C is a procedural language, whereas C++ is Object Orientated, is it worth learning both for industry or just C++?  I know this can depend on what type of programming I plan to do, but at the moment I don't know.

Also there are many different types of C, mainly just different compilers, but again which one should I choose? Which one would be the most useful?

Finally getting back to my original point of which book to choose, the problem is that every author and his dog seem to have written a book on C programming!  There are literally thousands to choose from, any ideas?
Who is Participating?
sterharConnect With a Mentor Commented:
I would recommend two books on C++.

First read, "C++ How to Program" By Harvey M. Deitel and Paul J. Deitel. This is a later edition of the first book I read on C++. It is an excellent introduction to C++ that covers the basics well.

Once you read that book and gain more experience, I would read "The C++ Programming Language" By Bjarne Stroustrup. The author of this book is the original designer of C++. He goes into a lot more detail and covers several advanced topics that other books don't get into.

Here are amazon links to the two books:


Jaime OlivaresConnect With a Mentor Software ArchitectCommented:
I always recommend this on-line book from Bruce Eckel: Thinking in C++, also comes in printed version:
About proper compiler, this is a hard question. If you want to develop for Windows environment only, then Microsoft Visual C++.net will be the best choice in my opinion.
About cross-platform compilers, any variant of the GNU C++ compiler will be useful. Also you will need a portable GUI like wxWindows (wxwidgets.org) or QT (www.trolltech.com).
Take a look to this useful page:
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Jaime OlivaresSoftware ArchitectCommented:
BTW. I have not copied AlexFM suggestion, just have spent more than 3 minutes in writting my post.
guntherothkConnect With a Mentor Commented:
If you already understand programming, then learning C is just learning how the selection and looping statements are spelled in C, and what library functions are available. Learning C will only take a few weeks. All the C compilers are pretty much equivalent.

However, there is no reason to learn C if you already know how to program. C skills are no longer particularly prized in the job market. There are more productive programming languages than C.

Object oriented programming is a superset of procedural programming; a way to break big problems up into individual objects that each are small enough to use the older paradigm on. It is worth learning object oriented programming if you intend to do any serious work.

C++ is an elegant and powerful language, but requires a significant time investment to master. Acedemic programs like to teach Java because it is simpler. Java's simplicity can translate to lower performance and bigger, messier code, but it's fine for many applications. Microsoft has invented a java lookalike called C#, which you should learn if you believe Microsoft will continue to dominate the world. There isn't a clear winner, so it's hard to place a big bet right now. C++, Java, and C# are all procedural, object oriented languages. They are all in wide use at this time.
Jaime OlivaresSoftware ArchitectCommented:
About guntherothk comment, I agree fully with last paragraph. But I think still is a good idea to learn pure C before learning C++, because this allow you to concentrate in some fundamental topics like pointers. Some pure C++ programmers lacks of a clear pointer/buffer awareness, and this topic is one of the cornerstones of C/C++ language.
mdroskeConnect With a Mentor Commented:
I would say, that starting off by learning C++ does not prevent you from getting a good understanding about pointers. If you learn C first, then you would have to forget about a lot of things, like callback routines, string handling, io etc and probably the first C++ programs will somehow still reflect some C-style and in the worst case a mixture of both C and C++.

I would suggest to use the Intel Compiler which is freely available on the intel website for non-commercial use. It has a very good optimization for Pentium processors but works also quite well with AMD processors.
In some advanced template cases, its more flexible than g++.

I agree to jaime that thinking in c++ is a very good reference.
StupotAuthor Commented:
Sorry it's taken me so long to reply, but my computer has ben in for repair and has takeen ages to be returned.  

Anyhow, i've looked at the reports for both the books mentioned by Sterhar, and am happy that they will be useful, so have ordered them.  Also the free online book mentioned by AlexFM and Jaime Olivares looks useful too, as is the information on which compilers.

Thanks all, for your help!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.