r/cpp_questions • • 2d ago

OPEN Where to start learning C++?

Hi everyone! I want to start learning C++, but I’m not sure where to begin. As my first goal, I plan to build a simple 3D viewport to understand how everything works in practice. Could you please advise on where a beginner should start?

18 Upvotes

12 comments sorted by

6

u/shivazgodz 2d ago

A 3D viewport isn't exactly a simple first project sure maybe a long tterm goal. . . C++ itself doesn't provide rendering capabilities, you need something like OpenGL, Direct3D, or Vulkan, along with libraries for window management and math. so then you're going to be learning multiple things at once, then you'll get overwhelmed and want to quit. You have to have real real real dedication and stubbornness to keep going. Lot's of things break, make no sense. You'll forget a lot of things.

anyways

Head on over to https://www.learncpp.com/
Learn all the basics . . . and start making simple boring stuff. Calculator, tic-tac-toe, text based rpg. ecct ect. The same things over and over again. Learn best practices, find what works for you.

2

u/Dazzling_Music_2411 2d ago edited 2d ago

This is very good advice, especially that C++ does not provide graphics, viewports or such like. You are going to have to use a library of some sort, which is fine, but you may want to learn some C++ basics first.

I can't advise against, LOL šŸ˜‚ one of my first cpp projects, a loooong time ago (it was still Windows 98 or something) was an OpenGL viewport under MFC. It was hard work.

7

u/thedaian 2d ago

As mentioned here: https://www.reddit.com/r/cpp_questions/comments/1n5zyxy/important_read_before_posting/

The website learncpp.com is the best place to start learning.Ā 

If you want to learn graphics, there's also learnopengl.com

2

u/Discordbothost 1d ago

Try raylib's core_3d_camera_mode example for the viewport. Run the cube and grid first, then make the left and right arrows change camera.position.x. You'll see what that one C++ change does immediately.

1

u/Aghoradas 1d ago

Don't sleep on cppreference.com either.

1

u/neerajprime 19h ago

In todays world

  1. buy any good C++ book
  2. use any of the available AI subscription or if you have decently powerful GPU then host a local model. You will learn very fast if you can have an AI answer basic questions quickly.

1

u/dajiru 16h ago

Start with the basics. Before to run you have to learn how to walk...

Freecodecamp in YouTube. A lot of c++ courses. I'm actually following one of... 31h!

1

u/FounderOfYou 2d ago

studyplan.dev is a good place to start from.