A portion of my program needs to initialize a std::set. The code I've pasted below works, but I'm wondering if there's a more elegant way to do it (an STL algorithm, maybe?). I'm a bit of an STL noob, so any advice people can give would be greatly appreciated. typedef std::map
Use an iterator. You can find a good example of it here. Hope this helps. Adrian Hi... I hope iterator is used incase the key is of a basic datatype. what about when the key is of the user defined data type like a structure..?? ie, when i need to find (search ) any one of the element of the structure. ...