📄 sortby.cpp
字号:
#include "Listing.h"
using namespace std;
bool sortByHighAmount(const Advertisement* a,const Advertisement *b)
{
return(a->getBid()<b->getBid());
}
Listing sortBy(Listing listing)
{
Listing::iterator first=listing.begin();
Listing::iterator last=listing.end();
std::sort(first,last,sortByHighAmount);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -