Utility Functions and C Language Reference > C Language Reference > Alphabetical List of Functions > struct


Example: struct

Groups together common variables (see union). The structure name is optional and not needed if the structure variables are defined. Inside it can contain any number of variables separated by semicolons. At the end, structure-variables defines the actual names of the individual structures. Multiple structures can be defined by separating the variable names with commas. If no structure variables are given, no variables are created. Structure-variables can be defined separately by specifying: To access a variable in the structure, you must use a record selector.

structstructure-name { 
} structure-variables,...;