Learn C++ Programming: Tutorials, Books & Notes for Beginners

  • C/C++
  • Thread starter rotphi
  • Start date
  • Tags
    C++
In summary: This book is a bit more advanced, but it's a great resource.In summary, the author recommends using a compiler to learn C++ and then writing little programs to learn the language. He also recommends a book called "Accelerated C++" and another book called "Numerical Recipes on C++."
  • #1
rotphi
4
0
Hello!
I just finished reading the C++ tutorial on cplusplus.com that is a very basic introduction into variables, constants, control structures, compound data types and some object-oriented elements. Now I want to go on and I am looking for some good tutorials, books or lecture notes.
I am a physics undergraduate student (3rd year) and want to do something like numerical mathematics with C++.
Any recommondations?

Thank you and have a good weekend,

rotphi

Link to the C++ tutorial on cplusplus.com:
http://www.cplusplus.com/doc/tutorial/"
 
Last edited by a moderator:
Technology news on Phys.org
  • #2
Ask on stackoverflow.com (or better still search the answers)

I would say just use it, C++ is a very large language - too large to just sit down and learn before you start. You know the basics, there are a couple of other things you should know -look at the STL (for vectors, arrays, algorithms) and BOOST (for everythign not int he standard library)
A lot of new programmers ignore these because they are complicated 9they are but the tutorials on cplusplus help) but it's better to invest soem time in learnign them than waste months getting 'C' style arrays to work.
 
  • #3
Thank you, this was really helpful.
I am now into "Numerical recipes on C++" by William H. Press but this book is very fast forward. I also read a bit about the GNU Scientific Library to get a better overview on this topic.
Are there any more suggestions?

rotphi
 
  • #4
Get a c++ compiler and write little programs as you read. You will learn much faster that way. Free c++ compiler is in any Linux distribution.
 
  • #5
  • #6
rotphi said:
I am now into "Numerical recipes on C++" by William H. Press but this book is very fast forward
It's an ok cookbook for some numerical techniques (although a lot of scientific programmers hate it = it teach you just enough to be dangerous)
But it's a terrible example of c++ code, it's basically pascal transated to fortran then translated to c then translated to c++, the routines mostly work but it's not a good style to learn from
 
  • #7
mgb_phys said:
it's basically pascal transated to fortran then translated to c then translated to c++

IIRC the Fortran version came first, then Pascal. I remember reading comments about the style being awkward for Pascal because they made as few changes as possible in "translating" from Fortran.
 
  • #8
I'm a second year undergraduate in Physics and Computer Science, going into my third year. And like you, I have an interest in numerical simulations. I just posted a small tutorial on a basic numerical simulation of gravity.

If they haven't moved it yet, (I posted it in the wrong forum by accident), here's the link: https://www.physicsforums.com/showthread.php?t=402565

Otherwise, it should be under this sub forum as "Intro to Gravitational Simulations"

Hope its helpful!
 
  • #9

1. What is C++ programming?

C++ is a high-level, general-purpose programming language that was developed in 1983 by Bjarne Stroustrup. It is an extension of the C language and is commonly used for developing operating systems, games, and other performance-intensive applications.

2. Why should I learn C++ programming?

C++ is a powerful and versatile language that is widely used in the software industry. It allows for low-level memory manipulation, making it efficient for resource-intensive applications. It also has a large community and a vast library of pre-written code, making it easier to learn and use.

3. What are some good resources for learning C++ programming?

Some popular resources for learning C++ programming include online tutorials, books, and notes. Some recommended resources include "C++ Primer" by Stanley B. Lippman, "The C++ Programming Language" by Bjarne Stroustrup, and online tutorials from websites like W3Schools and Codeacademy.

4. Is C++ programming difficult to learn?

C++ can be challenging to learn, especially for beginners who have no prior programming experience. It has a steep learning curve due to its complex syntax and concepts. However, with dedication and practice, it can be a rewarding language to learn.

5. What are some important concepts to understand in C++ programming?

Some key concepts in C++ programming include data types, control structures, functions, classes and objects, and pointers. Understanding these concepts is crucial for writing efficient and effective C++ code.

Similar threads

  • Programming and Computer Science
2
Replies
69
Views
4K
  • Programming and Computer Science
Replies
2
Views
1K
  • Programming and Computer Science
Replies
10
Views
2K
  • Programming and Computer Science
Replies
16
Views
2K
  • Programming and Computer Science
Replies
8
Views
1K
  • Programming and Computer Science
Replies
8
Views
13K
  • Programming and Computer Science
Replies
15
Views
1K
  • Programming and Computer Science
Replies
1
Views
2K
  • Programming and Computer Science
Replies
8
Views
873
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
Back
Top