iterator to any element in set belongs to address or value in c++? For example, my set is {1,2,3,4,5} and *it =3; So, here it is pointing to 3 or address where three is stored? I have tried it in my compiler, even after deleting 3 from set *it is still showing 3. How is this possible? And when I did it-- *it shows 2. And after it++, it directly jumps to 4. I have searched over internet but didn't find anything satisfying.