首页 > 其他 > 详细

statistic

时间:2016-08-16 00:26:05      阅读:213      评论:0      收藏:0      [点我收藏+]

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);

}

statistic

原文:http://www.cnblogs.com/streams/p/5774724.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!