I don't know i'm just using trial and error lol.
That may work for some simple task with a simple language, but C++ is not simple and game development is neither. You should get a good understanding of C++ by reading a
good book, make sure to check the documentation and if face with a problem sit down and
think about it before even doing anything with code.
Btw lol. is not a valid way to finish sentences in English.