how to print only first and last element of set using cout I am trying to print but it is giving error