The C++ Programming Language Fourth Edition is now shipping

Save to:
Instapaper Pocket Readability

My book The C++ Programming Language (Fourth Edition) is now shipping.

I got my copy (the very first copy!) on Friday. At 9am Monday, it became available on the publisher’s site, InformIT, and at 10am it had sold out. This is all very scary for an author. I have worked hard on this for about four years (not counting the 13 years it took getting the C++11 standard out), but of course a 1360-page book is huge, so I’ll find flaws. Anyway, that’s my problem.

For a description of the book, see In particular, read the preface and the back-cover text to see if this book might be of interest to you. It aims to be the most comprehensive description of the C++ language, standard library, and the programming techniques C++ is designed to support. It is not meant to be the quickest introduction to C++11 or a first introduction to programming. My TC++PL4 web page also has an extended table of contents, the Tour of C++, and the exercises.

As ever, comments (preferably polite and constructive) and bug reports are most welcome.

Add a Comment

Comments are closed.

Comments (31)

1 0

squelart said on May 13, 2013 05:40 PM:

Congrats! Can't wait to read it.
Will it be available in electronic form?
0 0

tangzhnju said on May 13, 2013 05:55 PM:

I have been looking forward to this book for a long time! Thank you, Bjarne Stroustrup!
0 0

sourav said on May 14, 2013 03:26 AM:

Great! Will wait to arrive in India smile
2 0

Bjarne Stroustrup said on May 14, 2013 07:03 AM:

Thanks for the comments. Some answers to questions here and in email:
(1) InformitIT has re-stocked and is again shipping
(2) There are discussions about an electronic version, but no decisions or concrete plans.
(3) There are discussions about a hardcover version, but no decisions or concrete plans.
(4) I do not know how long it takes for copies to reach England, India, etc.
0 0

NenadJankovic said on May 15, 2013 07:22 AM:


@Bjarne Stroustrup: do you recommend to read this book in combination with The C++ Standard Library: A Tutorial and Reference (2nd Edition) from Nicolai M. Josuttis that covers STL in depth?

Thanks, Nenad
0 0

Bjarne Stroustrup said on May 15, 2013 09:46 AM:

It is always good to look at a topic from more than one angle, but TC++PL4 does cover all of the standard library in considerable depth (almost 500 pages).
0 0

emsr said on May 15, 2013 12:23 PM:

I suspect a lot of people pre-ordered through Amazon or something. I know I did about 5 months ago. That's probably part of why they went so fast. This is a long awaited book though and I loved the 3rd edition. I can't wait to get my 4th edition copy.
1 0

Avidan Borisov said on May 17, 2013 08:46 AM:

Can you post a pic of the book? Just want to know how it actually looks smile
0 0

Bjarne Stroustrup said on May 17, 2013 08:57 AM:

I think Amazon was rather early with their announcement. Today, they promise shipping "in 1 to 2 days" and that sounds right. Amazingly, by pre-orders only, it made it to #218 a couple of days ago. I just hope my writing can live up to the high expectations.

You can find photos of the front and back cover on my site:
1 0

Avidan Borisov said on May 17, 2013 09:23 AM:

I saw the covers. I just wanted to see a real picture of the book (which is absent on InformIT and Amazon) because it seems a bit too huge for a paperback format, and I wanted to see what this "enhanced, layflat binding" is all about.

Congrats by the way. I, too, can't wait to read it.
0 0

Bjarne Stroustrup said on May 17, 2013 09:40 AM:

It *is* huge. 1360 pages. Sorry, but I think that's what it takes. The book does lie open nicely, though.
0 0

Greg Marr said on May 18, 2013 01:49 PM:

Avidan, do a google search for "lay flat binding" and you'll find some good examples of what this looks like. I've used several books with this kind of binding, and it is really nice.
1 0

Martin Trenkmann said on May 18, 2013 02:04 PM:

Congrats! I've been waiting so long for the publication of this book. Sadly, I am now rather disappointed to see that it is only available in a paperback version. This book is going to be a true reference for the next years, similar to the 3rd edition, I cannot understand why there is no hardcover version. I know that "There are discussions about a hardcover version, but no decisions or concrete plans." - is there a way to force the publisher's hand?

Please upvote if would like to see a hardcover version.
0 0

Bjarne Stroustrup said on May 18, 2013 02:31 PM:

"is there a way to force the publisher's hand?" Basically, no. I do what I can to convince, but the publisher has many concerns and tradeoffs. It is not easy to be a publisher theses days.

Note the price and the amount of information. As is, this may very well be the the best value for money on the market. Maybe, just buy two? grin
0 0

Martin Trenkmann said on May 18, 2013 03:19 PM:

Thank you Bjarne for the quick response, good to know that you try to convince. To be serious, I don't care the money. I would pay 100 bucks for a hardcover copy. This is your description of C++ and since you are the creator this book is a must have. Ok, I will wait a few months, please let us know if you have any new information from the publisher. Otherwise I have to live with the paperback. wink
1 0

planck_length said on May 18, 2013 04:40 PM:

I'm really keen to buy an electronic version and reluctant to buy the paper book. I've pretty much stopped buying paper books altogether, and I'm sure there are many people like me.

I hope the publisher decides to release an ebook soon.
0 0

Avidan Borisov said on May 19, 2013 11:26 AM:

0 0

Bjarne Stroustrup said on May 19, 2013 11:27 AM:

See, the publisher is listening!
1 0

sukant said on May 21, 2013 07:43 PM:

Looks it would be a long wait for the electronic version of the book. I expected Kindle edition would also be released. Dear Bjarne, can a request be made to the publisher from your side for an early release of electronic edition.
0 0

planck_length said on May 23, 2013 03:43 PM:

The book is probably selling like hot cakes (and deservedly so), in which case my guess is that the publisher will wait until sales taper off before offering an ebook.
0 0

Michael Olea said on May 24, 2013 10:48 AM:

I've had my copy of the book just a couple of days now, and am already fond of it. There is 1 frustration, though: "The constraints check used in this book can be found on the book's support site." I have not been able to find any such site (even after registering with InformIt).

One other thing: just noticed a bug in the bool operator<() on page 712:

"ate" < "ba" returns false.
0 0

Michael Olea said on May 26, 2013 05:40 AM:

There is a typo in the factorial function on page 793:

constexpr int fac(int i)
return (i<2)?1:fac(i-1);

It always returns 1.
0 0

Boris said on Jun 2, 2013 08:44 AM:

My copy arrived yesterday, just in time for the weekend. smile
I've got one small bug report:

The code on p. 189 (chapter 7.7) won't compile, because

v[2] = 7;

is done inside of a function to which v is passed as a const reference.
0 0

Michael Olea said on Jun 3, 2013 10:56 AM:

The reference section is missing. Doh! So you can see a reference like [Austern, 2003], but if you want to look that up you are out of luck - at least that is the case form my copy.
0 0

M2tM said on Jun 3, 2013 11:29 AM:

Awesome, I really want to read this. I was hoping I could order it on kindle! :<
0 0

Michael Olea said on Jun 3, 2013 04:30 PM:

OK, the reference section is not missing - just in an unusual place - page 32 .
0 0

Michael Olea said on Jun 3, 2013 04:59 PM:

Sample code very similar to that discussed in the book (e.g. the matrix example) can be found here:
0 0

Boris said on Jun 6, 2013 12:11 PM:

I'm quite glad about the extended coverage of templates and what can be done with them, reflecting their practical importance (judging from my daily experience) and the difficulty to comprehend stuff like metaprogramming (also judging from my personal experience wink ). Reading section 28.2, I came across the following bug: In the last line of code on p. 781, "Axis" should be replaced by "flags".
0 0

Stefan V said on Jun 12, 2013 06:10 AM:

A few days ago I received the book in Harghita county, Romania! Thank you very much for the great work, Bjarne.

A tiny bug report: p. 218: "new(&s)(e.s)" should have been "new(&s) string(e.s)".

More reports to come, while advancing through it.
0 0

planck_length said on Jun 15, 2013 03:28 AM:

For anyone interested in an electronic version, the ebook is now available:

Also - Amazon have a hardcover edition listed for release at the end of July:
0 0

anvesh said on Feb 19, 2016 07:06 AM:

Why isn't "The c++ programming language 4th edition" not published in India yet? Its been three years and there is a lot of pirated copies floating around for almost exactly the same price! That's really disappointing!