c++ - Forward declare FILE * -
how forward declare file *
in c? using struct mytype;
, naturally doesn't appear possible.
if behaviour differs between c standards or compilers , c++, of interest.
update0
why want aside: i'm asking how forward declare non-struct/"typedef'd struct" type can declare pointers it. using void *
, casting in source file bit hackish.
you can't. standard states file
"an object type capable of recording information needed control stream"; it's implementation whether typedef
of struct
(whose name don't know anyway), or else.
the portable way declare file
#include <stdio.h>
(or <cstdio>
in c++).
Comments
Post a Comment