C++ Tutorial Books: Easy to Complex | Advice

  • Thread starter Thread starter ghost313
  • Start date Start date
  • Tags Tags
    Book
AI Thread Summary
In the discussion about finding a good C++ tutorial book, several recommendations and critiques emerged. A specific book by Herbert Schildt was heavily criticized for its inaccuracies and poor programming practices, with participants suggesting that beginners should avoid his works. Instead, they recommended books by Bjarne Stroustrup, the creator of C++, and other titles that cater to different skill levels, emphasizing the importance of starting with solid foundational material. Free online resources, such as tutorials on cplusplus.com, were also highlighted as valuable for beginners. The conversation also touched on the object-oriented programming (OOP) paradigm, with some participants expressing that strict adherence to OOP may not always be necessary or beneficial, especially in smaller projects. The discussion underscored the need for flexibility in programming styles and the importance of selecting appropriate resources for learning C++.
ghost313
Messages
29
Reaction score
0
Can anyone advise me a good book on tutorials for C++?
Something that starts easy and goes to complex?
Thank you.
 
Physics news on Phys.org
Thank you :)
 
cpscdave said:
one I used when learning was
http://www.amazon.com/dp/0071634827/?tag=pfamazon01-20

Quite liked it till the binding failed :)
No! Do not buy any book about programming, in any language, written by Herbert Schildt.

Google the term "bullschildt". Then burn that book.
 
Last edited by a moderator:
  • Like
Likes deluks917
D H said:
No! Do not buy any book about programming, in any language, written by Herbert Schildt.

Google the term "bullschildt". Then burn that book.

Meh the book worked for me :D
 
The basic problems with any of Schildt's books is that they are full of sloppiness and even out-and-out errors, they are out of date, and worst of all, they teach what are widely regarded elsewhere as bad programming practices.

Some good introductory books on C++:
 
Last edited by a moderator:
This is the book that I learned from:
Problem Solving with C++ by Walter Savitch

But I would also recommend visiting http://www.cplusplus.com/
for some free tutorials
 
Also, I would imagine anything by Bjarne Stroustrup would be good.
 
  • #10
D H said:

This is what our CS department uses for C++ [0]. It's also since been updated to use C++11 and C++14.

As a general reference, having a copy of Stroustrup's The C++ Programming Language can't hurt.


[0] My claim to fame for this thread is that Stroustrup's office is 3 floors above mine, and I've also been in the same elevator as him...
 
Last edited by a moderator:
  • #12
Last edited by a moderator:
  • #13
D H said:
The basic problems with any of Schildt's books is that they are full of sloppiness and even out-and-out errors, they are out of date, and worst of all, they teach what are widely regarded elsewhere as bad programming practices. [/list]

Can you elaborate on those bad programming practices? I learned C++ as a freshman in college but I've ... 5 years later, begun to realize the whole OOP paradigm makes things a lot harder than they need to be in my cases. Unless you're actually writing an API, it's completely ok and maybe even good to not feel like you need to encapsulate everything in classes, particularly if you're working in small teams with good communication or alone where you don't necessarily need to prevent your code from being "used incorrectly". I came to this conclusions and others with the help of some software engineers' blogs...folks who are actually in the trenches trying to accomplish things effectively and efficiently, not by academics trying to write cool new language features that may or may not be useful.

That said, I'm not a software engineer or an expert on C/++. The books you recommended may also be full of productivity-based s.w.eng. practices. I simply find it fascinating what the "trade-oriented" side of s.w.eng. is saying, and think it might be useful for someone new to C++ to learn if/when OOP isn't appropriate in some cases.
 
Last edited:
  • #14
X89codered89X said:
Can you elaborate on those bad programming practices?
Schildt is widely reviled by those who do know how to program. The big problem with Schildt is that his writing style makes him widely loved by those who don't know how to program. An even bigger problem: That group unfortunately includes instructors whose job is to teach people to program.

Schildt apparently has a gift for writing clearly. Unfortunately, what he writes so clearly about oftentimes is clearly wrong. For a while, there were challenges on the internet regarding Schildt's books: Someone would pick book by Schildt and a random number, and then others would find the errors on that page in that book. This got a bit old as it became obvious that almost every page of every one of Schildt's books contained some error. Typos exist somewhere in every book, as do occasional misconceptions by the author of any book. But on every page? No. That shouldn't happen.

Schildt's newer books have apparently finally removed some of the extremely glaring errors (e.g., void main()) and extremely MSDOS-biased concepts (e.g., #include <conio.h>) that drove so many people so very crazy. Whether he has fixed things enough to cover his sins of the past remains dubious.
I learned C++ as a freshman in college but I've ... 5 years later, begun to realize the whole OOP paradigm makes things a lot harder than they need to be in my cases.
There's nothing in the C++ language that says everything has to be an object. Every working C++ program necessarily has at least one function, main, that is not a member of any class. C++ offers a number of different programming paradigms. You as the developer are responsible for determining which paradigm (or paradigms) best fit the problem at hand. There certainly are places where the object oriented paradigm is at best a sub-optimal choice, and C++ does not force you to make that sub-optimal choice.
 
  • #15
D H said:
There's nothing in the C++ language that says everything has to be an object. Every working C++ program necessarily has at least one function, main, that is not a member of any class. C++ offers a number of different programming paradigms. You as the developer are responsible for determining which paradigm (or paradigms) best fit the problem at hand. There certainly are places where the object oriented paradigm is at best a sub-optimal choice, and C++ does not force you to make that sub-optimal choice.

Well, yes. The language itself doesn't force you to stick to OOP, but culture and best practices I was taught in college were to encapsulate everything. Quite possibly you had a very different experience than I. But from other reading what working programmers have to say, I'm finding my training on dogmatically sticking to OOP and encapsulation-centric programming styles isn't that unique. That's all I was trying to point out to OP. These academic instructors (at least mine did this ) on C++ tend to focus on ideal styles of what code would look like, with less-than-appropriate regard for the the time it takes to actually write code in that style. Anywho..
 

Similar threads

Back
Top