c++ coarse Work