Re: using header - typedef
- From: "Doug Harrison [MVP]" <dsh@xxxxxxxx>
- Date: Sat, 07 Apr 2007 15:39:48 -0500
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
.
- References:
- using header - typedef
- From: Eitan M
- using header - typedef
- Prev by Date: using header - typedef
- Next by Date: Re: in command
- Previous by thread: using header - typedef
- Index(es):
Relevant Pages
|