Struct Definition
Struct Definition

A struct is a collection of different data types or variables which the programmer wants to be grouped together for some purpose. Each of the items in the struct can still be considered to have all the same properties it has when declared by itself; they are now just grouped together for convience or reability.

General Form:

struct tag { member1Type member1Name; member2Type memeber2Name; };
The member type can be any built in (or predefined) data type (int, float, etc.) and the member name is the descriptive variable name you want to assign it. The tag is the name you choose to refer to the struct.


Main Page
Last Modified 17 October 2000