gcc 4.4.4
c89
我在想以下兩種實現定義結構的真正區別是什麼?聲明結構的2種不同實現之間的區別
channel.h file
struct channel_tag;
struct channel_tag* init_channel(size_t channel_id);
void dispose_channels(struct channel_tag *channel);
channel.c file
typedef struct channel_tag {
size_t channel_id;
} channel_t;
===================二===============實行
channel.h file
typedef struct channel_tag channel;
channel* init_channel(size_t channel_id);
void dispose_channels(channel *channel);
channel.c file
struct channel_tag {
size_t channel_id;
};
非常感謝您的任何建議,