Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C Structs and Typedef

Name: Anonymous 2013-10-24 14:48

Help me understand structs and typedef.

What is the difference between:
struct tag_name{ type member; }
typedef struct tag_name{ type member; } struct_alias;

Why is the tag_name optional in number 2 if there is no self-referential pointer?

When creating an instance of a struct, when do you have to use:
tag_name instance;
and when:
struct tag_name instance;
?

Is using:
typedef struct tag{} alias
making it possible to say:
alias instance;
instead of:
struct tag instance;
?

Also when is the tag needed there?
How do you create an instance of:
typedef struct {} alias

Name: Anonymous 2013-11-02 15:44

So how many different identificator/tag namespaces does C have in all, five?

- variable tags
- type tags
- struct tags
- struct field tags
- label tags (for the goto shit)

Did I miss anything?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List