How can I learn C++ with UE4?

Create a small game like Pong or something. Focus on building one piece at a time. Solve each before moving to the next.
The biggest thing to get used to is code structure initially or at it was for me.
Follow great examples like shootertutorial.com and tomlooman.com
Try and fail and try again, takes time but you will get there.