C++容器排序函数sort
sort函数的使用
Tip:
1、头文件 < algorithm >
2、默认从小到大排序
3、可定制比较函数,即定制自己的“小于”函数
#include <deque>
#include <iostream>
#include <vector>
#include <algorithm>
class student{
public:
student(std::string person_name, int person_score){
原创
2021-05-24 19:40:55 ·
619 阅读 ·
0 评论