Without a pre-defined function pointer type
float (*GetPtr1(const char opCode))(float, float) { if(opCode == '+') return &Plus; else return &Minus; // default if invalid operator was passed }
參考來源: "float (*GetPtr1(const char opCode))(float, float)"
- The Function Pointer Tutorials - Syntax (在「Google 網頁註解」中檢視)
No comments:
Post a Comment