Aug 14, 2002 #1 Diksi Programmer Aug 5, 2002 5 GR Suppose we have a structure or class with data member double x. Then we put an object to a list STL container, something like that: container.push_back(object). Now how can we sort the container by value x and how can we find an object where the key equal x ?
Suppose we have a structure or class with data member double x. Then we put an object to a list STL container, something like that: container.push_back(object). Now how can we sort the container by value x and how can we find an object where the key equal x ?
Aug 15, 2002 1 #2 xwb Programmer Jul 11, 2002 6,828 GB Sorting sort (container.begin(), container.end (), greater) Finding container::iterator x = find(container.begin(), container.end (), value); Upvote 0 Downvote
Sorting sort (container.begin(), container.end (), greater) Finding container::iterator x = find(container.begin(), container.end (), value);