I want to change the element in a set, so I used set::iterator. However, the compiler argues \"the element is const\". Then I realized tha
set
set::iterator
EDIT: You cant add an element to a specific location in set. the set should be in the sorted order whatever operations you do. So you have to erase the specific element and insert the new element so that the ordering of set isnt lost.
Also read more about set!