View Full Version : C file management
sealfin
2002.07.24, 10:15 AM
is there a similar statement to extern for a typedef/struct/et al?
No. Types must be fully defined before they can be used. There is however a special case for a pointer to a struct:
typedef struct Foo *FooPtr;
and with c++
class Bar;
will allow you to use FooPtr's (and in the C++ case Bar& and Bar*) with all the advantages of strong typing without knowing what the innards of a Foo look like.
This is rarely useful on small- and medium sized projects, as it's only real purpose is data hiding. Why do you need this?
vBulletin® v3.8.4, Copyright ©2000-2010, Jelsoft Enterprises Ltd.