函数指针数组用二级指针保存(new 出来的),要如何调用啊?
CCalss **ary = new ary *[3]{ &A1 ,&A2 ,&A3 }; //这要怎么调用?
#include <iostream> using namespace std; class Foo { public: Foo(int value) { cout << value << endl; } }; int main(int argc, char *argv[]) { Foo **arr = new Foo *[3] {new Foo(1), new Foo(2), new Foo(3)}; delete arr[0]; delete arr[1]; delete arr[2]; delete[] arr; }