c++ code comparison