Learning how to code properly using C++