Add some C++ codes