- #include <stdio.h>
- int FuncTest(int a, int b, int c)
- {
- printf("%d,%d,%d\\n", a, b, c);
- return 1;
- }
- typedef struct
- {
- int (*read)();
- }Test;
- int main(int argc, char *argv[])
- {
- Test test;
- test.read = FuncTest;
- test.read(1, 2, 3);
- return 1;
- }
- //该片段来自于http://www.codesnippet.cn/detail/090720149908.html
来源: http://www.codesnippet.cn/detail/090720149908.html