What are the Best Books for Learning C++ on Your Own?

In summary: Is this your first programming language? Then please do not start with C++. Start with something like Python or Ruby -- it is far more accessible. You can move on to C++ at a later stage.Is this your first programming language? Then please do not start with C++. Start with something like Python or Ruby -- it is far more accessible. You can move on to C++ at a later stage.
  • #1
Jow
69
0
I am currently in high school and doing a lot of self study. I plan on going into physics in university and I was thinking about learning code, or at least becoming familiar with it. I have decided on C++ and I was wondering what are the best books for learning it on one's own. I don't know if this will make a difference at all to my learning process or what book I should get, but I currently use a mac. As I said I am doing a lot of self study (right now I am studying Linear Algebra) and I do have school work so my ideal textbook wouldn't be too rigorous. Any suggestions would be great. Thank you.
 
Physics news on Phys.org
  • #2
I completed my C++ course by Herbert Schildt's books. book is fat but its good.

P.S. if you have time then learn C firstly.
 
  • #3
My work experience includes 20+ years of software development in C++ and 5+ years in Ruby.

Imo, to start, study "Accelerated C++, Practical Programming by Example", by Koenig and Moo
http://amzn.to/12qgjKr

After you've mastered that, get "C++ Programming Language" by Bjarne Stroustrup
http://amzn.to/ZcpSFn

Other books to consider:
"Clean Code, A Handbook of Agile Software Craftmanship", by Robert C. Martin

"Framework-Based Software Development in C++", by Gregory Rogers

"Expert C Programming, Deep C Secrets"

And O'Reilly books for STL and Pthreads
http://oreil.ly/YS8BCD

Depending on what you want to do, I'd also encourage you to learn Ruby. Imo, Ruby and C++ is a super-hot combo :-))

And keep in mind, in only a few years hence, parallel computing (algorithms & development) will be more common. We already have 5 cores on a chip... in the foreseeable future, we can realistically anticipate 16 or more cores. So, I'm also suggesting that you add perhaps Clojure to your self-study http://clojure.org/ If you do that, then I suggest you use JRuby rather than Ruby, as both Clojure and JRuby use the Java Virtual Machine (JVM) with associated binding capabilities with Java
 
Last edited by a moderator:
  • #4
  • #5
"Engineering Problem Solving in C++"

I forget the author.
 
  • #7
xepma said:
Is this your first programming language? Then please do not start with C++. Start with something like Python or Ruby -- it is far more accessible. You can move on to C++ at a later stage.

I second xepma's suggestion. If this is your first programming language, start with python.

btw, why do you decide that you need to learn c++?
 
  • #8
Through research and a friend's suggestion I settled on C++. I don't know much about the various types of programming languages so I thought it would be best to pick a language and stick with it. However, I think I might reconsider. In that case any suggestions on books for C++ or Python would be helpful.
 
  • #9
Absolute C++ by Savitch. I have the 2nd edition. I love this book because it gives a lot of details of what's going on and also warns you about common errors.
 
  • #10
I would also encourage you to learn something like Python (together with numpy) instead of C++. You will find it a lot more useful for Physics.
 
  • #11
The most important thing is just to learn *a* programming language. If you're fluent with C++, Python will be easy to learn, and vice-versa. Your first programming language is by far the hardest to learn because you're learning how to think like a programmer. After that it's just a matter of learning syntax.

Personally, I would start with Python because it's an easier language. C and C++ give you more control over the computer, but unfortunately that means there are a lot more ways that you can screw up and spend a lot of time hunting down bugs in your code. With Python, there's a lot less to worry about and you can focus on learning to program rather than learning to deal with the nit-picky aspects of the language. You'll probably find that for your purposes Python can all of the same things C++ can, so I don't see any real advantage to learning C++ first. Also, like I said earlier, if you want to learn C++ later you probably won't have much trouble doing it once you know Python.

As far as books go, I'm not sure, but I thought I'd add my 2 cents about Python vs C++.
 
  • #12
One more thing I'd like to emphasize is that Python has become very popular for scientific computing, with a large and vibrant community.

Some links:

http://wiki.python.org/moin/NumericAndScientific
http://www.sagemath.org/

Python integrates easily with C, C++, and Fortran. My own Python code integrates with several C DLLs without my having to write a single line of C code.
 
  • #13
I really Love Professional C++ By Marc Gregoire. He is a Microsoft Most Valuable Professional for his knowledge in C++ visual. He really manages to explain comlex topics in an easy way. It is new as well, the last version from 2014. A must read if you ask me!

I write a little bit about it here discussing what I think is the best C++ book.

Good Luck!
 

1. What are the best books for learning C++?

The best books for learning C++ include "The C++ Programming Language" by Bjarne Stroustrup, "C++ Primer" by Stanley Lippman, and "Effective Modern C++" by Scott Meyers.

2. Are there any beginner-friendly books for learning C++?

Yes, "C++ Primer" by Stanley Lippman and "C++ from the Ground Up" by Herbert Schildt are both great options for beginners.

3. What is the difference between C and C++?

C and C++ are both programming languages, but C++ is an extension of C with additional features such as object-oriented programming and templates.

4. How do I choose the right book for my learning style?

It's important to read reviews and compare the content and structure of different books to find one that aligns with your learning style. You can also ask for recommendations from experienced C++ programmers.

5. Are there any online resources for learning C++?

Yes, there are many online tutorials, courses, and forums available for learning C++. Some popular resources include Codecademy, Coursera, and Stack Overflow.

Similar threads

  • Science and Math Textbooks
Replies
4
Views
1K
  • Science and Math Textbooks
Replies
17
Views
1K
  • Science and Math Textbooks
Replies
26
Views
3K
  • Science and Math Textbooks
Replies
3
Views
862
  • Science and Math Textbooks
Replies
9
Views
316
  • Science and Math Textbooks
Replies
19
Views
1K
  • Science and Math Textbooks
Replies
12
Views
1K
  • Science and Math Textbooks
Replies
14
Views
3K
  • Science and Math Textbooks
Replies
6
Views
1K
  • Science and Math Textbooks
Replies
3
Views
1K
Back
Top