这里是我的问题: 我定义了一个函子: class A {
public:
int operator()(int a, int b) const{
return a + b;
}
};
typedef function<int (int, int)> Fun;
然后我用一个匿名函子来创建一个std ::函数对象,我觉得有些奇怪。这里是我的代码: Fun f(A
没有可用的成员我有一个类 class Test{
public:
Test(){};
~Test(){};
void test() {cout<<"test"<<endl;};
};
和main.cpp中我有: #include "Test.h"
using namespace std;
int main(){
Test t();