with simple c++