View Single Post
Old Sep 26th, 2005, 5:38 PM   #5
stevengs
Professional Programmer
 
stevengs's Avatar
 
Join Date: May 2005
Location: Bad Nauheim, Germany
Posts: 436
Rep Power: 4 stevengs is on a distinguished road
Excellent question! A simple answer: type in this context means data type or representation. One differentiates between 'built-in' and 'user defined' data types. Examples of built in types are int, double and char. The struct you defined is of course a 'user defined' type.

Type Definition
struct xampl
{
  int x;
};
The name of the type is xampl, and it is defined as struct with an integer member.

After it has been defined, you may create instances of xample, just as you would create an instance of a built in type, such as int, double or char. As Ooble stated, in main you created an instance of type xample:
xample structure;
The variable, named 'structure', represents an instance of type xample.

There is, of course, much more to be said about types, but it is probably best saved for later.
__________________
-Steven
"Is this a piece of your brain?" - Basil Fawlty

Last edited by stevengs; Sep 26th, 2005 at 5:56 PM.
stevengs is offline   Reply With Quote