Re: using header - typedef

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



On Sat, 7 Apr 2007 23:36:55 +0300, "Eitan M"
<no_spam_please@xxxxxxxxxxxxxxxxx> wrote:

Hello,

on header (*.h) file,
I have something like :
typedef enum pstat {
...
} pstat_t;

...
typedef struct my_struct {
...
} my_struct_t;


I want a way to use those typedefs in the *.c file,
and not duplicate the above code in the *.c file.

How can I do that ?

Thanks :)

Surely if you know what a header file is, you also know #include?

BTW, if you're writing C++, and I guess you're not since you're talking
about .c files, you can (and should) write the above as:

enum pstat
{
...
};

struct my_struct
{
...
};

--
Doug Harrison
Visual C++ MVP
.



Relevant Pages