Codes during learning c++