remove the last of the c++ residue