class Student
{
public:
Student(void);
~Student(void);
public:
float _stuScore;
//布爾運算子多載
bool operator <(const Student& stu)
{
return _stuScore<stu._stuScore;
}
};
struct CharLess : public binary_function<const Student, const Student, bool>
{
public:
result_type operator()(const first_argument_type& _Left, const second_argument_type& _Right) const
{
return _Left< _Right;
}
};
hash_map<const char*, int, hash_compare<const Student, CharLess> > CharHash;
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/166937.html
標籤:C++ 語言
下一篇:IEEE754轉十進制數
