- 清帝之惑之顺治
- 2009-02-03 17:15:21 @
程序是这样的:
#include
#include
using namespace std;
class node
{
public:
int height;
int x,y;
};
bool less(const node& a, const node& b)
{
return a.height > b.height;
}
int main()
{
int n;
...
node *list = new node[n];
...
sort(list,list+n,less);
}
结果如此:
编译失败...|错误号:1
MyProger\Prog12932.cpp: In function int main()':
less' undeclared (first use this
MyProger\Prog12932.cpp:41: error:
function)
MyProger\Prog12932.cpp:41: error: (Each undeclared identifier is
reported only once for each function it appears in.)
未啥啊?我在VC上没问题
0 条评论
目前还没有评论...