[prev] [index] [next]

Structs

Structs contain a named collection of values of various types.

Structs are defined as:

struct StructTag {
	Type1 FieldName1;
	Type2 FieldName2;
	...
	Typen FieldNamen;
};

Often, we define structs via a typedef:

typedef struct StructTag {...} StructTypeName;