prev up next   top/contents search

comp.lang.c FAQ list · Question 2.2

Q: Why doesn't

struct x { ... };
x thestruct;
work?


A: C is not C++. Typedef names are not automatically generated for structure tags. Either declare structure instances using the struct keyword:

	struct x thestruct;
or declare a typedef when you declare a structure:
	typedef struct { ... } x;

	x thestruct;
See also questions 1.14 and 2.1.


prev up next   contents search
about this FAQ list   about eskimo   search   feedback   copyright

Hosted by Eskimo North