ŷ

Jump to ratings and reviews
Rate this book

Programming: Principles and Practice Using C++

Rate this book
An Introduction to Programming by the Inventor of C++ Preparation for Programming in the Real World The book assumes that you aim eventually to write non-trivial programs, whether for work in software development or in some other technical field.

Available here:
blubbu.com/download?i=0321992784


Programming: Principles and Practice Using C++ (2nd Edition) PDF by Bjarne Stroustrup

1236 pages, Paperback

Published January 1, 2008

461 people are currently reading
1220 people want to read

About the author

Bjarne Stroustrup

30books213followers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
254 (50%)
4 stars
152 (30%)
3 stars
66 (13%)
2 stars
18 (3%)
1 star
13 (2%)
Displaying 1 - 30 of 40 reviews
Profile Image for David.
16 reviews1 follower
August 14, 2017
I am self taught, and this was my first programming book around 2010. It starts out well, and I did every chapter problem up to error handling in chapter 4, then it started to get difficult. Meanwhile, I started using what I learned to solve early project Euler problems, I plowed on in the book and kept working through chapter 6 where the idea of Tokenization and Building a Parser is covered. This concept of making a grammar was above my ability. My progress stalled. I realized that if I kept doing every problem I would make extremely slow progress, so I decided to just read the rest of the book cover to cover carefully, and try to understand what I was reading, with the idea that later I would read other programming sources and I would have a base. This was a great Idea. The book imbued in me an understanding of the important topics a professional programmer considers, it also covers a wide variety of Ideas that were difficult for me then, such as Classes, Functions, Methods, Constructers, Destructors, virtualization and memory management. In any event the book did not teach me programming, it gave me the base to have the Eureka moments I needed from other sources, to eventually be able to write my own games and things from scratch. This book is Painful for beginners, but worth struggling through to develop a solid foundation.
Profile Image for Tae.
53 reviews13 followers
December 30, 2014
This book was written for people who have no background in programming, but I could not have learned to program with it. For people with a background in programming, it is a looong book, that have a lot of information.
Profile Image for Dan Dexter.
5 reviews
December 28, 2014
I first ran across the Programming Principles and Practice Using C++ book while I was searching for books that covered the new features introduced in C++11 and was surprised to see that this book covered both C++11 and C++14, and from the creator of C++, Bjarne Stroustrup himself. I was aware of Bjarne Stroustrup’s well renowned The C++ Programming Language book, but I hadn’t heard or seen the Principles and Practice book before. Per Bjarne, the book is meant more as both an introduction to computer science as well as an introduction to the C++ programing language and while I’m no stranger to either topic, I was curious enough to get the book to see how C++ is being taught to newcomers now that C++11 and C++14 have really breathed some fresh air into the language and have added some modern features that in the past have drawn newcomers to other languages. What I’ve found is what I consider to be a good introduction to computer science and hopefully what encourages more newcomers to flock to C++ now that it’s striving to keep up with features present in other increasingly popular languages.

Unlike Bjarne’s The C++ Programming Language book, this book isn’t really meant to be used as a desk reference, but more something that you would read either front to back or at least reading the chapters that interest you in the proper order; this isn’t just my take on how the book should be read, Bjarne outright recommends it towards the beginning of the book. This is especially true for people new to computer science as Bjarne starts off the book with a non-technical introduction to the field of computer science, what roles that computers play in various fields, and the high level process for developing programs. If you’re already familiar with programming and are a fairly technical person, this front-matter material won’t really be new to you, but I’ve found it surprisingly refreshing to read regardless.

Like any book that introduces a new language to someone, the book then covers the usual topics like operators, functions, classes, input/output, etc, but Bjarne’s writing style presents them in a way that is much more conversational and focuses heavily on what problems particular concepts seeks to solve. This is different than most books I’ve read where you’re more or less told what a class is and how to write one as opposed to walking the reader through the problems that they solve and taking time to address questions that are likely to arise from newcomers to programming. As an example, Bjarne asks and answers questions such as “Why do we build user-defined types?�, “What are types good for?�, and “How do we design a good class interface?� The author’s voice creates the experience that the reader is having a conversation with a professor rather than being presented with a tome of technical details that will likely leave an aspiring software engineer with a lot of unanswered questions. Despite being written to help accommodate users without a strong programming background, it doesn’t shy away from explaining lower-level details such as explaining how function calls are implemented, the function call stack, and the order that function parameters are pushed onto the stack.

In my opinion one of the strong suits of this book is that the C++11/14 features don’t have a dedicated chapter but are more or less baked into the overall book. While the downside of this is that the user may or may not be fully aware that a project will need to be using the newer standards to make use of some of these features, it helps the readers to grasp these topics at the appropriate time rather than pushing them all into their own chapter, which I believe encourages readers to become accustomed to these new features from the get-go rather than viewing them as some sort of language add-on that they learn after-the-fact. As an example, rvalue and lvalue references are presented together, and move semantics are presented side-by-side with copy semantics. If you’re new to the language you’ll likely think that move semantics had been a part of C++ since the early days; it’s not singled out as some new shiny feature.

Overall I found the book to be well written and excellent material to teach computer science and programming concepts at a university. If you’re new to programming in general or have a limited amount of experience with a higher level scripting language, then this book is a very good read. If you have a moderate amount of programming experience or some experience with C++ specifically, then you’ll likely find a book such as The C++ Programming Language by Bjarne Stroustrup to be written more at the appropriate level for you, but I wouldn’t disregard this book as it’s still an interesting read and somewhat refreshing to see how the language is being taught now that C++11/14 have changed the game. It’s a rather long book, but it gets my recommendation to anyone seeking to learn programming.
25 reviews
September 29, 2017
I found this book to be a rather good introduction to programming in general, as it touches quite a lot of very important topics regarding both the C++ language and programming in general. It is far more than just an introduction to C++ syntax, it is a thorough course introducing newcomers to a lot of programming related terminology, syntax, programming principles and strategies, programming history and philosophy and more.

This book really does a great job at introducing the student to a lot of (not exclusively) C++ related features, like:
- proper variable and function declaration and definition (headers, cpp files, namespaces, scope, initialization, pass-by-value or reference etc.)
-explaining different types of errors (compile-, link- and runtime errors, exceptions, narrowing, logic errors, range errors, etc.)
- classes (member access control, constructors, referencing, class inheritance, overriding and virtual functions, abstract classes, etc.)
- STL (iterators, code generalizing, algorithms, etc.)
- OOP
- Regex
- and a lot more.

Basically, by going through this book (and doing most of the exercises), one will become very familiar with an immense amount of basic concepts, but by far not all. There are some chapters which are only view broadening at best and provide little practical value, like testing, the C language, and embedded systems programming, but I can't say it to be a negative side of the book, as it never really intended these to be anything more than what they are. Any of these topics are separate (volumes of) books themselves, so no complaints here.

Another very interesting aspect of this book is, that it silently, without anywhere mentioning it, goes through literally every major part of the C language as well, which shouldn't be a surprise to anyone who is a bit familiar with the author's history. Nobody should interpret this though as one will be able to program in C after going through all this, but it will considerably make the process of learning C easier.

As everything human made, this book is also not perfect. Probably the one true negative side that I can mention, is that it literally is filled with forward referencing, by which I mean using concepts and language features that are going to be explained in later chapters only. Having the references to which (future) chapter one needs to go for an explanation doesn't help much, as those explanations are integrated into that particular chapter's topic, so just cherry-picking and reading these will put them totally out of context, and as such extremely hard to understand. For someone like me, who doesn't like "blackbox magic", it can be a bit frustrating.

Also, because of the aforementioned things, I found myself looking up internet references and forums for further clarifications for some of the less explained subjects, which is indeed a very important skill to acquire early on, but in case of this book, I do not think it was intentional, but rather a side effect of the topic structure. I understand on the other hand, that it is really hard to write a book aimed at total beginners for such a complex language like C++ (people usually start with python or ruby), so I'm not going to dwell on these.

So all in all, to sum this up, I would definitely recommend this book to anyone interested in programming, as it really does a great job at introducing all the necessary basic concepts not just for C++, but generally for programming as well. I must stress that no prior programming knowledge whatsoever is needed to start this book, so I encourage you to start today if you are interested in it. It will take quite some time to get through this, but you will be thanking yourself once you're done. C and Java syntax look like a breeze to learn after this, not to mention that this book will serve you as a good reference for both the language and general programming tricks during the beginning of your programming journey. I really do mean it, go and read this.
Profile Image for Ayush Bhat.
49 reviews24 followers
December 28, 2016
This is a GREAT book if one wants to learn more than just the knowledge of the C++ language. But its not like this book is for beginners, if you dont have a programming background you are not going to get anything in the starting.
Profile Image for Dima Escaroda.
17 reviews
November 20, 2021
It's inconsistent. Some parts are great but others are not. At first you admire how well it's structured but then you see ugly unformatted code examples, and simple ideas described in an oversimplified(=complex) way. I disagree with this method of teaching programming. It's not effective and I don't recommend it.
50 reviews10 followers
July 25, 2017
if you want to learn programming, and if working on C++ doesn't seem to bother you, then you can start by reading it.
Profile Image for George Vernon.
45 reviews9 followers
June 21, 2023
PPP is a textbook teaching C++, c.f. The C++ Programming Language which is a reference, and A Tour Of C++, which is an abridged reference.

PPP is pitched by Bjarne as a first-year university course to be covered in a single semester, for those who have never programmed before. This is not realistic, and the book is much better used as an intermediate level text for a programmer already comfortable with at least one other language, in my opinion. It is an excellent introduction to C++. As is proper for a textbook designed to accompany an undergraduate course, it covers fundamental data structures which would normally be seen in the first year of a computer science degree such as lists, hash tables, trees, and associated search algorithms.

It is an excellent book, well paced, with a surplus of exercises. Bjarne's prose is pleasant to read, occasionally amusing, always opinionated. As you would expect from the creator of the language, there is a healthy focus on best practises. Bjarne's aim is to teach software engineers, not leetcoders.

Chapters c12 -- c16 are interesting. If you already researched this book, you might have heard that some code in this book is broken: yes it is, and it relates to these chapters. Bjarne guides the reader through some basic UI implementation using a provided interface for the FLTK graphics library. Bjarne's provided interface was either dead-on-arrival, or it suffered breaking changes from newer versions of FLTK, or both. This is unfortunate because the intention of these chapters to teach OOP techniques in context is excellent. Here is some info on what you have to do to fix the mess:

Quality dips just slightly in the later chapters such as c24 Numerics, it's as if the test readers all started at the beginning and didn't make it to the end. Particularly, a few pieces of undefined or non-standard technical vocabulary creep in, and a few explanations are not coherent.

Regex is covered beautifully in c23.6, that sub-section being the most clear and terse explanation of it and best motivation of its syntax that I have read.
Profile Image for Rafsan.
145 reviews
October 1, 2024
I am self-taught programmer, and this is the first book that I have actually finished from cover to cover. It starts out well. It was really easy at the beginning. I solved every problem up to chapter 4. Then, the book got really difficult. I realized that if I kept solving every problem, I would make extremely slow progress. So, I decided to just read the rest of the book cover to cover carefully, and try to understand what I was reading. The idea was to finish the book first and I can always come back later to reread the book. This was a great Idea. The book was excruciatingly hard and painful. But I am really glad that I have finished the book. The book imbued in me an understanding of the important topics a professional programmer considers, it also covers a wide variety of Ideas that were difficult for me then, such as Classes, Functions, Methods, Constructers, Destructors, virtualization and memory management. In any event the book did not teach me programming, it gave me the base to have the Eureka moments I needed from other sources. This book is Painful for beginners, but worth struggling through to develop a solid foundation.

Overall, I found the book to be well written and excellent material to learn computer science and programming concepts. If you’re new to programming in general or have a limited amount of experience with a higher-level scripting language, then this book is a very good read. It’s a rather long book, but it gets my recommendation to anyone seeking to learn programming.
Profile Image for Aliaksei Ivanou.
118 reviews4 followers
April 7, 2021
Очень большая и очень толстая книжка от создателя С++. Книга, которая учит не только языку программирования, но и самому искусству программирования и правильной мысли. Учебник наполнен большим количеством примеров программных решений и большим количеством упражнений для самостоятельной работы. В целом книга адресована начинающим программистам C++, в ней нет каких-либо сложных тем и заданий. Первая половина книги охватывает широкий спектр основных понятий, методов проектирования и программирования, свойств языка и его библиотек, представлена графическая библиотека FLTK. Во второй половине рассматриваются более специализированные темы (такие как обработка текста, тестирование и язык C). В общем, советую для осваивания C++ =). В добавок ссылка на мои задания по книжке: (перманентно в стадии обновления).
1 review
November 6, 2020
The book clarifies many important topics that programmers with other high level programming languages like Python/NodeJS/Go will not know where to find. It has many fun problems too. However, to get the most of it, the reader should has some programming background and know how to trace the execution flow whenever problems arise. The example of the calculator Grammar is very challenging for even an experienced programmer. If you have problems understanding, just move on and see what you can get from the book with adequate work. According to 80/20 principle, 80% of what you need to know may require only 20% effort. After finishing the book, reading other texts in C++ (and other programming languages as well) is much easier, much more enjoyable.
1 review
May 21, 2021
This is "introduction to programming" boook. Hence it might be a good source if you are learning to program from scratch. But if you have a little experience with C/C++ or other languages the content would be perhaps too basic for you....
Although the book cover mentions (C++11, 17) the book does not elaborate on any of the new language features: memory model, multithreading, atomic ... as these are "too advanced"..
In my view this is a shame, as such core features could be learned from the beginning.
Instead, the book spends 4 full chapters around graphical user interfaces which I consider not so helpful. Specially since the author chose a rather obsolete and ugly GUI library: FLTK..
Profile Image for Dana.
22 reviews1 follower
November 23, 2019
Comprehensive with tons of exercises, written by the creator of the language. May be challenging as a beginner's first programming book but should be accessible for those with some prior knowledge. Worth it with C++ to work from a recognized source than from web pages. Gaining a wrong understanding could be worse than knowing nothing at all and this book will (hopefully) save you the trouble of such an error.
4 reviews
February 25, 2021
It is really a good book to read for anyone I think.
Though some subsections may be redundant and talk too much, which makes it a little bit tedious and hard to continue to read, the book is still worth to read with leaping to where you need most(I prefer chapter 1 and 3).
By the way, quantities and qualities of exercise will not disappoint you. Try to do it and think independently, your programming ability gonna improve a lot.
Profile Image for Naing Tan.
70 reviews1 follower
January 31, 2023
Great knowledge from the C++ creator himself. Definitely enriched me with the fundamentals of C++ and recommended ways to write a program. It’s a lengthy book though. I wouldnt recommend reading from cover to cover- just pick what you want to know and read it. But I can assure you most topics are all interesting. I did skim quickly through the chapter on testing though since it was out of my depth. Anyway great book.
Profile Image for Luca Barillá.
6 reviews
May 4, 2023
if you want to learn c++, it's a good book (mostly because he is the father)
if you want to learn how to code it's ok.

Unfortunately variables names could be better (as for names like "d","mm","n"), and he needs to explain the meaning using comments instead of using more meaningful names in the first place.
So, code could be written better (it always can be), book as Code Complete 2 or Clean code can help in this case.

Calculator example is great and well done.
1 review
January 28, 2024
This is a very very poor book and does a terrible job in explaining even the basics to its target audience. I've been programming for years and I found it hard to follow. The jump in difficulty from chapter 5 to 6 is laughable and could only be deemed acceptable by someone who has spent their entire lives in the academia bubble. If you're new to programming avoid this like the plague as it will put you off for life.
Profile Image for Pratik Khanke.
13 reviews
December 25, 2019
Great introduction book for novices. Well this is not book to learn about language but rather about how to program, programming techniques and practical uses. Many of the C++ facilities are not thoroughly explained but enough information is given that students can look it up.
6 reviews1 follower
June 22, 2020
Построение книги взято от "Язык программирования C", Ритчи Деннис М., Керниган Брайан У. тот же Калькулятор и другие главы, но кроме всего этого книга более формальна, точнее термины, больше математики, плюс классы которых нет в языке Си
Profile Image for Waleed Yaser.
4 reviews
July 3, 2019
Great book for learning programming in general and have a good knowledge about C++, I recommend trying examples with yourself and maybe solve most of the excercises.
7 reviews1 follower
November 27, 2019
Old school C++ in action, recommended if need to learn that dinosaur!
22 reviews2 followers
Read
April 12, 2020
This is a really well laid out book. It's very clear and a good introduction to programming from a first principles sort of perspective.
1 review
January 20, 2021
A good read, but requires some prior basic programming knowledge. Perfect read for transition from Python to C++
Profile Image for Edham Arief.
25 reviews
November 19, 2024
It's worth it to go through this book at least once as a programmer. The fundamentals are covered well.
Profile Image for Duip.
66 reviews
Read
April 2, 2025
To date, the best published textbook by Bjarne Stroustrup, but not sufficiently comprehensive.
Profile Image for Isscandar.
103 reviews3 followers
Read
August 31, 2013
Stroustrup, il creatore del C++, ha scritto un ottimo libro adatto a chi è interessato ad imparare la programmazione ed il linguaggio stesso ad un livello intermedio.

Non si tratta infatti di un libro che spiega solo un linguaggio di programmazione in astratto oppure che spiega i concetti della programmazione dei computer (mi piacerebbe dire delle "macchine calcolatrici" per usare solo l'italiano) senza fare esempi concreti: si tratta invece di un libro che armonizza molto bene questi due aspetti.

Stroustrup ha scritto anche un libro, "The C++ Programming Language" solo sul linguaggio C++ ma si tratta di un libro più conciso (ma non più corto!) che dà per scontato che si sappia già programmare.

Consiglio di leggere per primo "Programming" e solo dopo passare a "The C++ Programming Language"... se poi non si è ancora sazi allora si può passare direttamente a leggersi lo standard ISO (è un po' costoso: lo standard ad oggi fresco di stampa e relativo al nuovo C++0x costa più di 300 franchi svizzeri ) ma a quel punto si è veramente soli con il proprio compilatore e nient'altro.




Profile Image for jsallcock.
17 reviews
March 13, 2024
Programming, Principles and Practice using C++ is an excellent introduction to C++ by Bjarne Stroustrup, the original creator of the language. The author writes with clarity and with reference to real-world applications, and the dry humour peppered throughout keeps things entertaining. In fact, the logical ordering of topics means that most of the book can be read front-to-back without too much pain.

I would recommend this book for people who already have a bit of experience programming in a higher-level, interpreted language (e.g. Python, R, Matlab) but who want a readable introduction to the C++ syntax, memory model and standard library.

It’s not perfect. Almost 200 pages are dedicated to programming Graphical User Interfaces (GUIs) with the lesser-used FLTK library. At the same time, there is almost nothing on concurrency. This seems like a strange decision to me.

[Disclaimer: mine is the 2010 edition]
Displaying 1 - 30 of 40 reviews

Can't find what you're looking for?

Get help and learn more about the design.