Using data types before they are declared.

August Wehrmann awehrmann at watcgl.waterloo.edu
Tue Jun 13 04:27:10 AEST 1989


I have a question: 

Is it possible, (and if so, how?), to use a data type in a declaration
of say, a union, that has not yet been declared?

Here is an example of what I'm talking about.

union Fred {              <--------
	int 	Number;            |
	element	Node;     <...........
};                                 | .
                                   | .
typedef struct {                   | .
	int	Info;              | .
	Fred	Name;     <--------  .
} *element;               <...........


Please e-mail any replies. Quick references to Kernighan and Ritchie would also
be appreciated.

Thanks in advance.

-- 
===============================================================================
 August Wehrmann, awehrmann at watcgl{.waterloo.edu, UWaterloo.ca} 
 Computer Graphics Lab, Department of Computer Science, University of Waterloo
===============================================================================



More information about the Comp.lang.c mailing list