code_junkie

issue with FILE

Nov 13th, 2011
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. FILE *fp[] = {stdout, dump_f};
  2.  
  3. FILE *fp[2];
  4.  
  5. void init_fp()
  6. {
  7. fp[0] = stdout;
  8. fp[1] = dump_f;
  9. }
  10.  
  11. // external.c
  12. int hello = 1234;
  13.  
  14. // external.h
  15. extern int hello;
  16.  
  17. // main.c
  18. #include "external.h"
  19.  
  20. int world = hello; // error!
  21.  
  22. extern FILE *stdout, *stdin, *stderr, *dump_f;
Add Comment
Please, Sign In to add comment