PAT记录
sort自定义比较函数bool Less(const Student& s1, const Student& s2){return s1.name < s2.name; //从小到大排序}sort(sutVector.begin(), stuVector.end(), Less);sort(s, s+20, Less);int 转 string —— to_string()枚举:enum weekday {sun=1,mon,tue,wed,thu,fri,sat}
原创
2021-07-13 16:16:53 ·
384 阅读 ·
0 评论