typedef-ing an array

Peter Clark pclark at SRC.Honeywell.COM
Fri Jun 29 08:36:11 AEST 1990


Is it possible to specify a type definition like this:

typedef char foo[24];

foo bar;

and have type 'foo' be an array of 24 characters (or maybe 23 & a null), and
variable 'bar' an instance of this type?

Is there anyway to typedef an array (of a specific length)? Obviously, the
above declaration doesn't do it, or I wouldn't be asking. If the typedef
mechanism isn't sufficient (I don't think it is), how can this be done?

	Pete Clark
	Honeywell SRC
	Minneapolis, Mn



More information about the Comp.lang.c mailing list