My attempt at learning c++