[geeks] [4][4] matrix

Greg A. Woods woods at weird.com
Tue Feb 26 12:26:40 CST 2002


[ On Tuesday, February 26, 2002 at 08:53:27 (-0500), Joshua D Boyd wrote: ]
> Subject: [geeks] [4][4] matrix
>
> float t[4][4];
> 
> t=myFunc();
> 
> What is the proper way to declare myFunc so that the above would work 
> properly?  More importantly, what book or web site would one go looking up 
> such on?  All my c and C++ books gloss over such things since they were meant
> for freshmen.

There is no possible way in C to do that exactly.  You cannot return
array types like that from functions.

	A function may be defined to return a any type except "array of
	T" or "function returning T."

If you're going to write C code then you really need a copy of the
latest edition of "C - A Reference Manual" by Samuel P. Harbison and Guy
L. Steele Jr.  Publised by Prentice Hall.  I have the 4th edition, 1995,
ISBN# 0-13-326224-4.

The above quote is from page 276 of that book, section 9.7 "Function
Return Types."

-- 
								Greg A. Woods

+1 416 218-0098;  <gwoods at acm.org>;  <g.a.woods at ieee.org>;  <woods at robohack.ca>
Planix, Inc. <woods at planix.com>; VE3TCP; Secrets of the Weird <woods at weird.com>



More information about the geeks mailing list