什么是“typedef void FuncType(double,int)”?

时间:2016-03-08 09:25:16

标签: c++ function-pointers

我不明白typedef void (*p)(double, int)的含义! 但我不明白typedef void FuncType(double, int)的含义!

示例:

void test(double, int) {}
typedef void FuncType(double, int);
//using FuncType = void(double, int);

int main() {
    FuncType *f = test;
    f(1, 3);
    FuncType ft;
    ft(10, 50);//ERROR: 'unresolved external symbol' during compilation process
    return 0;
}

0 个答案:

没有答案