mixing pointers and arrays

chris at umcp-cs.UUCP chris at umcp-cs.UUCP
Sat Aug 13 17:16:24 AEST 1983


Well, you can always write

struct array {
	int x[10];
};

main () {
	struct array a1, a2;

	foo (&a1);		/* call foo with address of array a1 */
	bar (a2);		/* call bar with array a2 */
}

A bit of a kludge, but it works in the current C compilers....

				- Chris
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci
UUCP:	{seismo,allegra,brl-bmd}!umcp-cs!chris
CSNet:	chris at umcp-cs		ARPA:	chris.umcp-cs at UDel-Relay



More information about the Comp.lang.c mailing list