After getting competent enough with C++ i had this problem for a while.
Even though I could read code properly when the code was from a command line program, when it came to a pong SFML program i was confused even though i used the documentation to see if i could understand the code i was very confused because i don't know how game programming works.
I searched the forums and saw that there were similar problems but not exactly like my problem.
I realize that there are way too many more things to learn about game programming other than just C++ such as the main game loop and frame movement etc.
So my question would be, how would i design game programs?