Codes while learning c++ language