I would recommend doing some simple introductory internet course first and then moving on directly to making something very simple happen in UE4.
One of the better elementary tutorials I would say is C++ Language - C++ Tutorials
The best place to start after that is by reading the documentation for UE4 at: https://docs.unrealengine.com/latest/INT/Programming/
and then creating one of the game templates, reading the code there and try to do some simple modifications. Perhaps changing how fast you run etc.
The hardest part about getting better at programming is making sure that you are improving at the type of programming you want to do.
Basics are of course very important, especially in C++, and the best way to learn the absolute basics is by writing simple console applications to learn fundamental syntax, using your IDE and even slightly more advanced skills like memory management practices and data structure usage etc.
But after those first steps, the best way to learn is by doing. And if you are to learn by doing, you might as well do it in the environment you want the skills for, with the associated libraries.
I see far too many new programmers aiming to learn C++ for programming games practicing with user32 programming, some STL course material or Qt and the like, and not only is it not as fun and motivating, but you will also not be able to use the library specific skills when you start looking at your domain.