标题:请教,为什么不能编译通过?
只看楼主
superbigman
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2005-11-1
 问题点数:0 回复次数:0 
请教,为什么不能编译通过?

#include<list>
#include<iostream>
#include<string>
#include<vector>
#include<algorithm>

using namespace std;

class Entry{
public:
string name;
int number;
Entry(const string& a, int b):name(a), number(b){}
};


int main()
{
vector<Entry> ve;
ve.push_back(Entry("xhl",123456));
ve.push_back(Entry("chen",654321));
sort(ve.begin(),ve.end());
return 0;
}

sort函数为什么会出错?而且都是algorithm头文件里出错,请高手指教.

搜索更多相关主题的帖子: 编译 
2005-11-01 10:56



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-32171-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.198834 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved