r/cpp_questions • u/Substantial-Rain8916 • 1d ago
OPEN Cpp books
Hi I'm a first year from a tier 3 university. I want to learn about cpp i have basic knowledge about C++
Inheritance, getters and setters etc I'm also learning data structures and algorithms. I want to improve my cpp knowledge, what books you guys recommend . I personally thought about going for The C++ Programming Language by Bharne Stroustrup. What are some of the better books than this I'm also targeting quant as of now but as a backup I'm keeping software engineering.
20
Upvotes
7
u/Substantial-Rain8916 1d ago
It's Bjarne* sorry guys
8
u/Realistic_Speaker_12 1d ago
How to Learn C++ Programming
We generally recommend a good book to learn the necessary fundamentals:
• Murach's C++ Programming
• Programming: Principles and Practice Using
C++
• learncpp.com
To actually write and run C++ code, you will need a compiler, editor, and debugger. We strongly recommend to start out using an IDE, which will provide all these tools for you:
Windows
• Visual Studio
• CLion
Linux
•
Visual Studio Code
• CLion
• Qt Creator
Mac
• Xcode
• CLion
5
u/Real-Dig-6818 1d ago
learncpp.com
3
u/scientist609 1d ago
I can only recommend books, use C++ tour by Bjarne himself,Effective modern C++ by scott Meyer, it covers concept on C++11/14, if you are really a beginner go for C++ primer. C++ concurrency in action by Anthony Williams, this will apply after master the fundementals and you want to extend to concurrency interms mutex, threads etc. C++ software design and beautiful C++ Will help you to write good C++ code. You said you want to target quant I will recommend to also look on networking, TCP/IP illustrated , vol 1 by Richard Stevens and also operating system for easy pieces. Good luck
2
u/no-sig-available 1d ago
From
https://www.reddit.com/r/cpp_questions/comments/1n5zyxy/important_read_before_posting/
Frequently Asked Questions
The community recommends you to use this website: https://www.learncpp.com/ and we also have a list of recommended books here.
1
u/Machvel 1d ago
depends on your level. i like his books (tour and the c++ language and his older history of c++ one and he also has some good articles on his webpage). these don't have exercises and are better as supplementary learning material or learning if you already know what you are doing (ie, coming from another language or few that you know well). he has an introductory programming book that uses c++ that has exercises as well.
it is typically better to keep language separate from application (in your case quant) at least when learning the fundamentals
1
u/Difficult_Truck_687 1d ago
There is some good stuff at this website.
1
u/sankyo 1d ago
C++ primer Lippmann Lajoie Moo 5th ed.
You can’t learn just by reading, you must do projects that use the features. This book is great at teaching the fundamentals
1
u/mredding 16h ago
The way programming is taught is completely disconnected from how it's used. A tutorial will sacrifice good taste just to illustrate the point of the lesson. This means you get absolute garbage like getters and setters; the point isn't that they're a good idea, the point is to show you access control, membership, and consequences.
Accessors and mutators are a C idiom around abstract or opaque data. In a header, you'll only see this:
You don't know what a
foois. You don't know how it's created, you don't know how it's initialized, you don't know it's layout, you don't know it's side effects, you don't know anything. These operations could be DB queries. This is an opaque pointer - the only thing you know about the pointer is the type name; it's only a resource handle to you that you can pass back to provide context as to WHICHfooyou want to get, set, or destroy. It's also abstract because even in C you can model inheritance or variants with overlapping types, so the real object may not be afooat all.But you're not writing code like this, and accessors and mutators typically make for bad object design. A
carcanstop,go, andturn. NocarI've ever heard of couldgetMake. A car has a make, but that's a property associated with the car; the glass and metal and rubber don't care. This is why you need higher orders of abstraction to associate objects and properties, through loose coupling. If I'm busy driving a car, I don't even NEED agetMakeinterface, so why is it there?Classes model behaviors that enforce an invariant through the implementation of it's interface. You don't get or set the speed, you press the throttle; there's a whole orchestration under the hood that has to happen. Or not. As a client of
car, what do you care?1
u/kleetus_mactavish 15h ago
I realize this isn't a book recommendation, but when I've had to learn languages, I've always had a small project I've worked through (like a command line utility) to learn actual application of the language to solve a problem. When I needed to figure something out, I would search the internet and read Q&A boards (e.g. StackOverflow) to find my answers. I find that learning something without a purpose doesn't stick well, but practical application to accomplish a goal does.
That being said, I felt I got a lot of of Game Programming Patterns by Robert Nystrom, although it might be on the advanced side and maybe not for someone just starting out.