📄 payroll.cpp
字号:
#include <iostream.h>
#include <stdlib.h>
#include <string.h>
#include "book.h"
class Payroll {
public:
int ID;
char* name;
};
class IDCompare {
public:
static bool lt(Payroll& x, Payroll& y)
{ return x.ID < y.ID; }
static bool eq(Payroll& x, Payroll& y)
{ return x.ID == y.ID; }
static bool gt(Payroll& x, Payroll& y)
{ return x.ID > y.ID; }
};
class NameCompare {
public:
static bool lt(Payroll& x, Payroll& y)
{ return strcmp(x.name, y.name) < 0; }
static bool eq(Payroll& x, Payroll& y)
{ return strcmp(x.name, y.name) == 0; }
static bool gt(Payroll& x, Payroll& y)
{ return strcmp(x.name, y.name) > 0; }
};
int main(int argc, char** argv) {
Payroll* foo;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -