P
Pat
class data
{
public:
double time;
// other functions....
}
I want to put a lot of "data" classes into a container, and the data order
should be sorted according to "time" variable. One of method is to use
vector<data>. After push_back(), call sort function.
Does there exist a container which provides "auto" sorting function? i.e.
After inserting each data, I do not need to call implicitly "sort" for
sorting.
Thanks. Pat
{
public:
double time;
// other functions....
}
I want to put a lot of "data" classes into a container, and the data order
should be sorted according to "time" variable. One of method is to use
vector<data>. After push_back(), call sort function.
Does there exist a container which provides "auto" sorting function? i.e.
After inserting each data, I do not need to call implicitly "sort" for
sorting.
Thanks. Pat