是否可以对Pair< string,node>的列表进行排序。基于节点的属性(字符串)之一?如何?
//这是一对列表的定义
list< pair< string,car> > car_details;
// Node Creation
struct car{
string id;
string date;
string etime;
string exit_time;
double price;
};
car Node {id,date,s2,s1,s1,nose};
// ID,DATE,S2,S1 -String,金额-Double
-Insert正在执行, car_details.push_back(make_pair(id,carnode));
//实际上想基于该输入时间(etime)属性进行排序(格式为hh:mm:sss)喜欢(“ 08) :35:20“)
//THis is how list of pair has defined
list<pair<string,car> >car_details;
//node creation
struct car{
string id;
string date;
string etime;
string exit_time;
double price;
};
car carnode{id, date, s2, s1, amount};
//id,date,s2,s1 -string , amount -double
insert is being performed like this,car_details.push_back(make_pair(id,carnode));
//Actually want to sort based upon that entrytime(etime) attribute ( which is string in the format HH:MM:SS) like ( "08:35:20")
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论