simplify c++