?? earlier.h
字號:
// FileName:earlier.h
// 定義了函數對象earlier,用于構造multiset結構
#ifndef EARLIER_H
#define EARLIER_H
#include <algorithm>
#include <iostream>
#include <fstream>
#include <string>
#include <iomanip>
#include <map>
#include <set>
using namespace std;
typedef map<string, string> PropertyMap;
struct earlier: binary_function<string, string, bool>
{
bool operator()(const string& name_lhs,
const string& name_rhs) const
{
return dateProp[name_lhs] < dateProp[name_rhs];
}
// dateProp[name] holds year in which Ph.D. degree was
// granted to name
static PropertyMap dateProp;
// placeProp[name] holds institution that granted Ph.D.
static PropertyMap placeProp;
};
// 靜態成員變量的初始化
PropertyMap earlier::dateProp;
PropertyMap earlier::placeProp;
#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -