Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Possible Duplicate:
Recommended books on C++

Is there a canonical book on learning programming with C++ as a first language?

I have toyed with Java and Python but when my laptop broke I couldn't program anymore. That was months ago and between now and then I have decided my real first language should be C++. Now my question is what book I should read.

Is there a book out there that is both a good introduction to programming for a first time programmer and recommended for learning C++ as a first language?

share|improve this question

marked as duplicate by ChrisF Dec 28 '11 at 16:53

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Also check out stackoverflow.com/questions/388242/…. –  Anna Lear Dec 25 '11 at 6:01
Your second question is answered here, here, and here. Stack Exchange sites work best by sticking to one question per, well, question. :) –  Anna Lear Dec 26 '11 at 16:47
Unless you have a practical reason for wanting to learn C++ first, you are much better off choosing something else. C++ is big, and there is a lot of very, very bad advice out there on how to use it. –  Marcin Dec 26 '11 at 18:50
Yeah I actually do, I want a powerfully language that I can use to program something on any machine the globe over. Also I like a challenge and as far as I know it is the most popular language in the world. –  11D Reality Hacker Dec 27 '11 at 3:34

4 Answers 4

up vote 7 down vote accepted

Programming -- Principles and Practice Using C++ - is a great introduction to programming and C++

But it's still hard work - C++ is an industrial grade language, learning to use it professionally is no easier than learning any other world class technology to a professional level

share|improve this answer

The C++ language has some strong modifications in 1999 2003 and 2010/11. Before spending money for whatever book, just look when it was first written: if it is before 2003 there will be good chances it will be outdeted, and -even if updated with a new "edition"- it will probably still be outdated in the philosophy.

Some warnings: avoid all books that present an "hello world" stating with

#include <iostream.h>

and also avoid all those book that talks about template and STL only at end. In general, taking of the keyword new before talking of vector is a simptom of outdated text.

Righ now (December 2011) the book that to me better represent today's C++ philosophy without too much binding to the past, is

Accelerated C++ http://www.amazon.com/Accelerated-C-Practical-Programming-Example/dp/020170353X

share|improve this answer

I have seen Accelerated C++ to be usually recommended to beginners.

Because it

  • Starts with the most useful concepts rather than the most primitive ones: You can begin writing programs immediately.
  • Describes real problems and solutions, not just language features: You see not only what each feature is, but also how to use it.
  • Covers the language and standard library together: You can use the library right from the start.

The authors proved this approach in their professional-education course at Stanford University, where students learned how to write substantial programs on their first day in the classroom...

share|improve this answer
What makes it a good book for beginners? –  11D Reality Hacker Dec 25 '11 at 14:24
@zvrba A link to the book and more books would be more helpful. –  Karlson Dec 26 '11 at 1:24
I don't think Accelerated C++ is good for beginners, starting with the title of Accelerated, maybe it's good for fast, capable learners (or people with a good amount of previous programming background), but I would say choosing something slower-paced is better. –  Bob Dec 26 '11 at 8:20
@Wesley: read about it on its webpage: acceleratedcpp.com –  zvrba Dec 26 '11 at 11:31
@zvrba Please see the notice at the top of the page: "Don't just give a one-line answer: please explain why you're recommending it as a solution." –  Anna Lear Dec 26 '11 at 16:49

First of all, what I'd recommend you do is go to a website such as LearnCPP, don't go through the whole thing, but see what you think of it. Determine if you like C++, or if you'd want to start with a slightly "easier" language - and determine if C++ offers what you're looking for. For example, if you're into web design, perhaps C++ isn't the best choice for you.

Now, if you do choose C++, I can say that you probably shouldn't just focus on the programming language, especially on your first programming language. What you should focus on is programming itself, and try to learn bits and pieces of computer science along the way. This way, you'll ultimately be a better programmer, and hopefully less language-dependent.

Anyhow, here are a few good books:

The C++ Programming Language (Bjarne Stroustrup) - definitely get this book sometime in your C++ career

C++ Primer (Stanley Lippman, Josée Lajoie, and Barbara E. Moo) and/or C++ Without Fear (Brian Overland) - both are good introductions to the C++ programming language

Programming: Principles and Practice Using C++ (Bjarne Stroustrup) - another fantasic C++ book, good for beginners or even more advanced programmers

I would as recommend you go to StackOverflow's list of C++ books, as there are some great ones on there.

If you can, find a computer science-y book, and maybe look for some books on data structures and algorithms as well.

UPDATE: On the topic of "canonical", see the C++ Programming Language or Programming: Principles and Practices Using C++

share|improve this answer
Bob C++ Primer Plus is from 2004, is all the information it has still relevant to C++? Or is out of date? –  11D Reality Hacker Dec 25 '11 at 5:32
@WesleyMarkPennock First of all, C++ Primer is not the same as C++ Primer Plus (which I would NOT recommend). Regardless, (and this is true in most cases) while technology changes rapidly, a good book never grows outdated. Think K&R, it's still one of the best C books out there. –  Bob Dec 25 '11 at 6:27
@Bob Books certainly can grow outdated. What is considered "idiomatic C++" has changed a lot over the years, so books from before 2000 are certainly outdated by now. –  Sjoerd Dec 25 '11 at 11:07
Apparently, LearnCPP teaches arrays and pointers in Chapter 6 and the STL in Chapter 16. This will give the reader a warped view on C++. For example, std::vector is far more important in modern C++ than arrays. (I have yet to see an online C++ course that doesn't suck.) –  fredoverflow Dec 25 '11 at 12:02
@FredOverflow I can only hope you haven't seen mine :-( No char or array till the very last lesson. –  Kate Gregory Dec 25 '11 at 15:44

Not the answer you're looking for? Browse other questions tagged or ask your own question.