大家好
我有一個header, test.h, 有一個function pointer
typedef int(*pfnTest_t)(void* x, unsigned char* y, unsigned
int z);
一個API:
int test_api(pfnTest_t p_pfnTest);
然後有一個cpp
class B {
...
test();
...
}
B::B_API(void* x, unsigned char* y, unsigned int z){
...
}
B::test()
{
test_api(&B::B_API); // error!
}
compiler的時候 有error
請問這cpp裡面如何把function pointer帶進去??
謝謝!