1. PF Contest - Win "Conquering the Physics GRE" book! Click Here to Enter
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Best Books for Learning C++

  1. Mar 4, 2013 #1


    User Avatar

    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.
  2. jcsd
  3. Mar 5, 2013 #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.
  4. Mar 5, 2013 #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 [Broken]

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

    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

    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: May 6, 2017
  5. Mar 5, 2013 #4
  6. Mar 5, 2013 #5
    "Engineering Problem Solving in C++"

    I forget the author.
  7. Mar 6, 2013 #6
  8. Mar 6, 2013 #7
    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++?
  9. Mar 6, 2013 #8


    User Avatar

    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.
  10. Mar 6, 2013 #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.
  11. Mar 7, 2013 #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.
  12. Mar 9, 2013 #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++.
  13. Mar 10, 2013 #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:


    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.
  14. Mar 12, 2015 #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!
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted