定义一个类:
class CA
{
public:
int operator()
{
return 0;
};
private:
}编译时出错:error C2143: syntax error : missing ';' before 'private'
class CA
{
public:
int operator()
{
return 0;
};
private:
}编译时出错:error C2143: syntax error : missing ';' before 'private'
class CA
{
public:
int operator()()//出了“操作符”(),还应有包围函数参数的()
{
return 0;
};
private:
}
#include <functional>
...
plus< double > x;编译出错:error C2065: 'plus' : undeclared identifier为什么?