我有一个名为A的类,如下所示:
class A
{
protected: typedef bool(*fp)();
public:
virtual void back(fp succesor,fp valid,fp solutie,fp show); // this function is defined in the .cpp
};
和来自A的B类看起来像这样:
class B : public A
{
public:
bool succesor(); //defined in cpp
bool valid(); //defined in cpp
bool solutie(); //defined in cpp
bool show(); //defined in cpp
void generate()
{
back(succesor,valid,solutie,nullptr);
}
};
我没有向你展示构造函数和类的实例化,因为它在这个阶段并不重要。
我的想法是,当我将后退调用放入generate函数时,会给出这3个错误:
错误C3867:'B :: succesor':函数调用缺少参数列表;使用'& B :: succesor'创建指向成员的指针
相同但使用其他功能名称
相同但使用其他功能名称
拜托,你能告诉我我的错误在哪里吗?
谢谢