fixed compiler error for cp.cpp