C++ Primer or PPP Stoustrup: Which Book is Better for Beginner Programmers?

  • C/C++
  • Thread starter Of Mike and Men
  • Start date
  • Tags
    C++
In summary, I think that if you are a beginner or intermediate programmer, you should get Stroustrup's C++: The Complete Reference or Programming: Principles and Practice Using C++.
  • #1
Of Mike and Men
54
3
Hey everyone,

I've been looking to get another C++ book. I'm currently using Gaddis Control Structures through Objects (required at my university). However, I find sometimes their explanations are poor or their examples are too long to really illustrate the point they're trying to make (e.g. a near 300 line program to explain polymorphism -- something that could be done in probably 30 lines of code).

I have I have a semester's worth of C++ under my belt, and a semester's worth of Python under my belt. I've been doing some research on additional books to read, and it seems like Primer or Programming: Principles and Practice Using C++ are the kind of go-to books for beginner programmers. I'm torn. I've heard PPP is more useful if you've never programmed before, while Primer is better if you have. My debate is that I've heard Stoustrup goes into more detail (since he is the creator of C++, which is why I'm leaning towards this book) than Primer -- while Primer teaches better practice on how to actually code (which I'm not sure if this would be more useful for me at this point). I plan on getting both at some point, but what do you recommend for someone in my position with my experience?

If it matters: both semesters I received an 'A' in the course. In Python I felt more confident in my abilities. Whereas in C++ I felt like even though I earned an 'A', I left the course with more questions than answers since C++ is so massive. In the book we used, we covered basics like functions, classes, arrays, pointers, etc. and then covered some more advanced topics like OOP, polymorphism, inheritance, c-strings, and advanced file i/o topics. This latter topics, while I did well on the test, I felt overwhelmed and lost on all of them. I think my book did good explaining the more elementary topics, but these last few chapters were horrendous. Reading the book actually took the fun out of programming through these chapters, and I often resorted to videos just to get the big picture.

Anyways, thanks for any advice.
 
Technology news on Phys.org
  • #2
Stroustrup is a master, not just regarding C++, but about programming principles more generally. Learn from him.
 
  • Like
Likes Of Mike and Men
  • #3
Theres also Scott Meyers Effective C++ and the various Design Patterns books too. Design patterns goes beyond the basics and gets into how to use OO effectively while not painting yourself into a design corner with no exit ie poor design that only a complete redesign will fix.

https://www.amazon.com/dp/1491903996/?tag=pfamazon01-20
 
Last edited by a moderator:
  • Like
Likes QuantumQuest
  • #4
Of Mike and Men said:
Hey everyone,

I've been looking to get another C++ book. I'm currently using Gaddis Control Structures through Objects (required at my university). However, I find sometimes their explanations are poor or their examples are too long to really illustrate the point they're trying to make (e.g. a near 300 line program to explain polymorphism -- something that could be done in probably 30 lines of code).

I have I have a semester's worth of C++ under my belt, and a semester's worth of Python under my belt. I've been doing some research on additional books to read, and it seems like Primer or Programming: Principles and Practice Using C++ are the kind of go-to books for beginner programmers. I'm torn. I've heard PPP is more useful if you've never programmed before, while Primer is better if you have. My debate is that I've heard Stoustrup goes into more detail (since he is the creator of C++, which is why I'm leaning towards this book) than Primer -- while Primer teaches better practice on how to actually code (which I'm not sure if this would be more useful for me at this point). I plan on getting both at some point, but what do you recommend for someone in my position with my experience?

If it matters: both semesters I received an 'A' in the course. In Python I felt more confident in my abilities. Whereas in C++ I felt like even though I earned an 'A', I left the course with more questions than answers since C++ is so massive. In the book we used, we covered basics like functions, classes, arrays, pointers, etc. and then covered some more advanced topics like OOP, polymorphism, inheritance, c-strings, and advanced file i/o topics. This latter topics, while I did well on the test, I felt overwhelmed and lost on all of them. I think my book did good explaining the more elementary topics, but these last few chapters were horrendous. Reading the book actually took the fun out of programming through these chapters, and I often resorted to videos just to get the big picture.

Anyways, thanks for any advice.

The important thing is to assess your real coding capabilities in C++ so far, a thing that - talking according to my own experience in the past, is difficult when you are a student. I would recommend trying to code some intermediate to advanced algorithms yourself with some fairly advanced data structures. What I'm talking about here is things like three way merge sort, quicksort with three way partition just for starters and beyond, to coding complex algorithms in the most efficient way(s)(including proper and efficient use of the necessary data structures) - I'm assuming that you already know the classic merge sort and quicksort very well and again these are just two (not so complex) examples. The reason I recommend this is that it is the suggested way by many well known computer scientists and seasoned programmers - a great such case is Robert Sedgewick recommending it for Java (you can take a look at the free online Algorithms course offered by Princeton University on Coursera) and for very good reason: in order to efficiently code a (fairly) complex algorithm, create a client program to run it and test it for performance you'll find yourself constantly digging through the basic language so you'll grasp things that can't be clear through a simple basic course. This way you'll get a fairly informed picture about what text you need next and the way you must study it. It goes without saying and I'll agree to Dr. Courtney that Bjarne Stroustrup is a real master but what you need heavily depends on where you are right now regarding coding and what is your goal. C++ is a fussy beast to tame and there are relatively few programmers all over the world who are real masters of it, the reason being that this whole software system is really huge and it needs many years of real world experience in order to get acquainted with it. If you find that at some point you really have all the basics under your belt then go with any good advanced text - Stroustrup's books are preferred books for me too.
 
  • #5
jedishrfu said:
Design patterns goes beyond the basics and gets into how to use OO effectively while not painting yourself into a design corner with no exit ie poor design that only a complete redesign will fix.

This is also a really great recommendation by jedishrfu. I recall the great joy I had in the past to take some online courses in mobile programming by Douglas Schmidt - one of the persons involved in the books of design patterns and it was a tremendous experience and a real call for further reading.
 
Last edited:
  • #6
The dissenting opinion: you might want to browse the C++ FQA before deciding how much of your life you want to invest learning C++. (If nothing else it's wonderfully sarcastic -- you won't be bored.)
 

What is the difference between "C++ Primer" and "PPP Stoustrup"?

"C++ Primer" is a comprehensive guide to the C++ programming language, written by Stanley B. Lippman, Josée Lajoie, and Barbara E. Moo. It covers a wide range of topics, from basic syntax to advanced features. On the other hand, "PPP Stoustrup" (also known as "Programming: Principles and Practice Using C++") is a beginner-friendly book written by Bjarne Stroustrup, the creator of C++. It focuses on teaching the fundamental principles of programming using C++ as the primary language.

Which book is better for beginners?

Both "C++ Primer" and "PPP Stoustrup" are excellent resources for beginners. However, "PPP Stoustrup" may be more suitable for those who have little to no programming experience, as it covers the basics in a more accessible and structured way. "C++ Primer" assumes some prior knowledge of programming concepts and may be more suitable for those with some experience in other languages.

Which book offers a more in-depth coverage of advanced C++ features?

"C++ Primer" provides a more comprehensive and detailed coverage of advanced C++ features, such as templates, exceptions, and the Standard Template Library (STL). "PPP Stoustrup" focuses on teaching the fundamental principles of programming, so it may not cover these topics as extensively.

Which book is more frequently updated?

"C++ Primer" is more frequently updated, with the latest edition being the 5th edition, published in 2012. "PPP Stoustrup" has only one edition, published in 2009. However, both books cover the essential concepts of C++ and are still relevant for learning the language.

Can I use both "C++ Primer" and "PPP Stoustrup" together?

Yes, you can use both books together. They complement each other, with "PPP Stoustrup" providing a solid foundation in programming principles and "C++ Primer" offering a more in-depth understanding of the language. However, it is not necessary to use both books, as each book can be used as a standalone resource for learning C++.

Similar threads

  • Programming and Computer Science
2
Replies
69
Views
4K
  • Programming and Computer Science
2
Replies
49
Views
3K
  • Programming and Computer Science
Replies
8
Views
880
  • Programming and Computer Science
Replies
5
Views
1K
  • Programming and Computer Science
Replies
16
Views
1K
  • Science and Math Textbooks
Replies
7
Views
664
  • Programming and Computer Science
3
Replies
81
Views
5K
  • STEM Academic Advising
Replies
3
Views
921
  • Programming and Computer Science
Replies
17
Views
2K
  • Programming and Computer Science
Replies
6
Views
2K
Back
Top