Declaring Structure Types

Enumeration types are useful, but there are more powerful types you can declare, called structure types.

Structure types let you bundle up a set of member variables into a single variable. Then you can keep related data together in a single package and pass it around just as you pass an int or a char. You can even make an array of structures.

A structure type is declared with keyword struct, a name, and any number of typed members:

struct typename
{
   type membervariablename...
} ;

Here's an example:

struct aTapeElement
{
   char Operator;
   float Operand;
} ;

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.125.96