摘要: #include <iostream>using namespace std;void print(int);typedef struct { void (*print)(int num);}TEST, *PTEST;int main(){ TEST test; test.print = print; test.print(10); TEST test2 = {print}; test2.print(20); return 0;}void print(int num){ cout << num << endl;} 阅读全文
posted @ 2012-05-31 10:29 hanyuanbo 阅读(170) 评论(0) 推荐(0) 编辑