simple conversion in c++