fix Cpp snippet