指針也能存函數了嗎

其實就是指向函數的指針的數組,將這些指針存在數組中便可。 一個小小的實現以下代碼:ios #include <iostream> using namespace std; void func0(int i = 0) { cout << 0 << endl; } void func1(int i = 1) { cout << 1 << endl; } void func2(int i = 2)
相關文章
相關標籤/搜索