If you're looking into learning C++ for gamedev, the best thing you can do is to choose a simple graphics library and/or game engine and just stick to learning how to work with that library. Every one is different so every time you change the engine you use, you're basically starting from scratch again and will have to learn how to use that new engine.
C++ is quite the show especially these days with a new standard coming out every 3 years, while trying to maintain backwards compatibility with the last 30 years.
I recommend first learning how to set up a project using CMake
. Almost all popular C++ libraries use CMake so this is a great starting point to ease yourself into the workflow of C++ development and it'll make adding libraries to your projects easier down the road.
I also recommend learning how to use git
and registering an account on github.com or gitlab.com, where you can host the projects you create.
For libraries, I would recommend starting with SFML
. It's designed for 2D graphics, and it has really good documentation, tutorials and examples you can use. And it's simple in design.
If you're looking for a simple 3D engine, Urho3D
is possibly one of the most elegantly designed ones I've come across. It's a bit obscure, but it's very easy to build and it has all of the features you would expect an engine to have (physics, animation, UI, pathfinding, audio, IK, etc.) while still being very small in size. Godot
is another good one, but the problem with this one is that it encourages you to use their scripting language rather than C++ to develop the games, so if your goal is to learn C++ it's probably not the best choice.
When it comes to learning the C++ language and all of its pitfalls, you might want to pick up a book. For me personally, I started with a book called "Road From C to C++" and I can't find it on google, weird. The "C++ for Dummies" book is also quite good. The book will help give you an overview of the syntax, the tools, and the standard library, but most of it I learned through writing lots and lots of code and googling.