Forum Discussion
Altera_Forum
Honored Contributor
14 years agoYou are correct, both forms only create a 'type'. You can exemplify this by slightly changing the first form into
typedef struct {
enum { READY, COMPLETE, CLOSE } state;
int fd;
int close;
INT8U rx_buffer;
INT8U *rx_rd_pos; /* position we've read up to */
INT8U *rx_wr_pos; /* position we've written up to */
} SSSConn; You see that you can leave out the ' SSS_SOCKET' tag. Only when you instantiate a 'type' actual storage will be allocated. e.g.:
SSSConn master , slaves ; will actually reserve storage.