struct Student
{
std::string groupNo;
std::string No;
viclint void clear()
{
groupNO.clear();
No.clear();
}
}
bool operator< (const Student& l, const Student r)
{
return (l.groupNum < r.groupNum)
||((l.groupNum == r.groupNum ) && (l.No < r.No));
}
typedef std::map<Student, count> Student2Count;
Student2Count m_Student2CountMap;
Student key;
Student2Count::iterator cit = m_Student2CountMap.lower_bound(key);
if(cit != m_Student2CountMap.end() && !m_Student2CountMap.key_comp()(key, it->first()))
{
m_num += 1;
}
else
{
m_Student2CountMap.insert(make_pair(key,m_num);
}
时间: 2024-10-13 22:20:41