I'm having trouble declaring structs as types. The compiler refuses typedefs of long structs


There is a legacy limit in the compiler: typedefs cannot be longer than 256 characters. In most cases, this limit is never reached.

There is a completely effective workaround: using the tag facility in struct, union, and enum declarations. The tag serves as a kind of typedef: declaring a struct, union, and enum with a tag (but without a variable name) allows the tag to be used in subsequent declarations, including typedefs.

For instance:

struct tag_mystruct { int one; int two; int three; };

typedef struct tag_mystruct type_mystruct;

will allow a structure definition (or union or enum) of longer than 256 characters.