Update cp.cpp

Fixed the optional flag requirement