Helpful Information
 
 
Category: C Programming
C++ Books

Hi all

I've already found dozens of books on the subject, but after reading their backcovers, it's still hard to pick one up and say this is the one I want. So I'm asking for recomendations. Any book(s) that you found especially helpful when you started out learning C++?

I really like C++ How to program (http://www.amazon.com/exec/obidos/ASIN/0130895717/qid=1010477415/sr=8-1/ref=sr_8_71_1/102-5129412-8245755) , I found it clear and easy to read, while covering a wide range of topics.

Originally posted by daholygoat
I really like C++ How to program (http://www.amazon.com/exec/obidos/ASIN/0130895717/qid=1010477415/sr=8-1/ref=sr_8_71_1/102-5129412-8245755) , I found it clear and easy to read, while covering a wide range of topics.
Yeah, it seems that users of Amazon also recomend it as a beginner's book. I also noticed it has UML covered. How wide is it handled? Is UML a necessery part of learning C++?

I also noticed it has UML covered. How wide is it handled? Is UML a necessery part of learning C++?

Actually, in my edition of the book it wasn't covered, and no, it's not necessary to know it in order to learn C++. UML means Unified Modelling Language, and it's basically just a conventional way of OOP designing. It's one of the most popular software engineering modelling techniques nowadays, so it's always good to know, I guess.

I would start with "Kernighan & Ritchie: The C programming language" (Or simply "the bible", as some refer to it as). Even though it's about C, I think it's the right place to start because it's probably easier to understand C++ (hell, any language) after learning C because i forces you to understand so many other things about computers and how their black magic works.

Originally posted by andnaess
I would start with "Kernighan & Ritchie: The C programming language"
Comments in amazon suggest the use of a DOS based compiler when using this book. Is this actually neseccery or do you have a suggestion for a compiler?

Well, I did all my C coding under unix, and there you have CC and GCC for free... There should be free C-compilers for Windows available aswell, try a websearch, I'm sure something will turn up...

It is however quite an advantage to use *nix when working through this book because C and unix were developed together and they are very strongly connected. You can always use the cygwin enviroment under windows:
http://www.cygwin.com/

Comments in amazon suggest the use of a DOS based compiler when using this book. Is this actually neseccery or do you have a suggestion for a compiler?

The K&R book is not talking about which compiler to use. Besides, CC and GCC are free for win32 as well. So is this (http://www.borland.com/bcppbuilder/freecompiler) compiler from borland.


It is however quite an advantage to use *nix when working through this book because C and unix were developed together and they are very strongly connected.

ISO C however, is portable to a large number of platforms, so it shouldn't matter.

I actually ran the Cygwin distribution on my work machine but after installed, it didn't work. It seemed to miss a very valuable .dll file.

I like the books by Bruce Eckels because they're good and I can either buy them at my local Barnes & Noble or download them for free.

http://www.mindview.net/Books
http://www.mindview.net/Books/DownloadSites
http://www.mindview.net/Books/books.html

Take a look at the following if any of them interest you:
Thinking in C++, 2nd Edition (I like the .pdf version http://www.planetpdf.com/mainpage.asp?WebPageID=315)
Thinking in Java, 1st and 2nd Editions
Thinking in Patterns
Thinking in Python

The C Programming Language - Kernigan and Ritchie
The C++ Programming Language - Bjarne Stroustrup
Effective and More Effective C++ - Scott Meyers
C++ How to Program - H. M. Deitel, P. J. Deitel
Thinking in C++ (2nd Ed) - Bruce Eckel

You know, I think it is important to learn how in interact with the compiler on the command line like in the unix environment. It helps you learn more of what is going on while a program is being complied.

As far as good books, I know this is going to sound bad, but the C for Dummies books are not that bad.
Another is Problem Solving with C++. These are both good for beginning programming in C/C++.
I agree with And, it is better to start out with C. Most everything you learn in C can be used in C++ you just gain a few extra's in C++ that C doesn't use. OOP would be the most obvious of these.

Datamike:
You may want to re-run the cygwin downloader to see if it will pick up the missing dll. I have the cygwin environment installed at work & home.

What's your suggestion for a highly php-experienced guy like me? I already know a lot about php classes and objects - should I start C or C++ ?

(sorry, little bit offtopic)

Most of the syntax that is used in PHP is derived from C. You can start with C++, which is what I did, but I went back and studied C afterwords. It is easier to learn C first, which would build a good foundation for learning C++.
If you are in a situation where you would program in both languages, I would definately recommend doing C first. If you learn C++ first, then try to do C you will find yourself getting a little irritated at some of the things that you can't do that you take for granted in C++. Like input/output functions. Whereas you are already use to using functions like printf, sprintf for output (which are C functions), you can still use these functions in C++, but C++ has a I/O stream library so that you can use cin and cout for input and output. This is only for C++ though.
By learning C first, you only gain programming power by moving up to C++ afterwords. If you do the reverse, you only feel more restricted.

Datamike ive had a look at most the free C++ e-books around on the net and they all seem to confuse the subject greatly, i would suggest you purchase a couple of C++ books and make sure they contain stuff about the STL it's the best way


Mark

I know this is going to sound bad, but the C for Dummies books are not that bad.

Some people seem to not share your opinion much, hehe.
http://www.accu.org/bookreviews/public/reviews/c/c000269.htm
http://www.amazon.com/exec/obidos/ASIN/1568849397/104-6142167-5483123

Some people did not agree with my suggestion, but then again some did. I think if you are having difficulty understanding some things about the C language this isn't a bad place to start.
I didn't say they were the best, but they aren't as bad as the review states, I believe the comment at the bottom of the page says a lot.
I believe once you move past the beginner stage of programming in general you don't need a beginner book except for language reference (and in most cases you can get all of the language reference from the language "bible" so to speak) and you can jump straight into the more advanced stuff that really gets down deep into the language.
But that is just my opinion, I could be wrong.

Datamike,

I always suggest the better (but longer path): go through C first, then C++.

Although you can get to C++ without getting the "pure C" concepts first, but after that you'll never appreciate the real value of STL in C++ unless you have actually used C without STL and Classes. :)

K&R (as suggested in a couple of posts above) is a good "to the point" approach book for C.

For C++, also look up books by Robert Lafore. He has 3-4 compiler-specific books too.

I was looking for The C Programming Language by Kernighan & Ritchie, and noticed that the lasted edition (2nd) was 1988 ('89 for paperback). Is this the book that you guys have been referring to as "The Bible" for C? I just wanted to double check before buying it.

Thanks!

That's the one! :)

K&R on Amazon (http://www.amazon.com/exec/obidos/ASIN/0131103628/qid=1010558451/sr=8-1/ref=sr_8_71_1/104-5191440-8062342)










privacy (GDPR)