1. test.h:
  2.  
  3. #include <stdio.h>
  4. #include <stdlib.h>
  5.  
  6. struct test
  7. {
  8. int (*foo)(int test1, int test2);
  9. int test;
  10. };
  11.  
  12. test.c:
  13.  
  14. #include "test.h"
  15. int bar(int test1, int test2)
  16. {
  17. puts("test");
  18. return 0;
  19. }
  20. foo = &bar;
  21.  
  22. main.c:
  23.  
  24. #include <stdio.h>
  25. #include <stdlib.h>
  26. #include "test.h"
  27.  
  28. int main(void)
  29. {
  30. struct foobar;
  31. foo(1,2);
  32.  
  33. return 0;
  34. }