terrible c++ code