extern question

Doug Gwyn gwyn at brl-smoke.ARPA
Tue Jul 5 13:57:01 AEST 1988


In article <457 at m3.mfci.UUCP> karzes at mfci.UUCP (Tom Karzes) writes:
>        extern struct foo   x;
>        extern struct bar   y;
>        struct foo  x = {123, &y};
>        struct bar  y = {456, &x};
>Now suppose you want to make x and y static.  What do you do?  

Same thing, but include "static" in all declarations that mention
them, particularly the first.

	static struct foo x;
	static struct bar y;
	static struct foo x = { 123, &y };
	static struct bar y = { 456, &x };



More information about the Comp.lang.c mailing list