cpp snippet