Exapmle codes for c++