このエラーを解決できません: コード:
class myClass
{
public:
void callMain() ;
void (*callme)(int a , int b);
}
void myClass::callMain()
{
callSomeApi(callme, <some arguments>); //callme function pointer is passed as argument
}
void (myClass :: *callme) (int a, int b) // it this the correct way to define a function pointer
{
}
Visual Studio 2008 エラー C2470 で次のエラーが発生します: callme は関数定義のように見えますが、パラメーター リストはありません。見かけの体をスキップする`
編集: 私の考え: 1. クラス myClass でメンバー関数ポインターを作成したい 2. スコープ外で定義します。3. その関数ポインタをいくつかの Api 関数のパラメータとして渡します。