Re: [C] functions and 2D arrays?
From: Arthur J. O'Dwyer (ajo_at_nospam.andrew.cmu.edu)
Date: 01/09/04
- Next message: forums_mp: "Re: reference counting semantics more .."
- Previous message: Arthur J. O'Dwyer: "Re: [C] functions and 2D arrays?"
- In reply to: Arthur J. O'Dwyer: "Re: [C] functions and 2D arrays?"
- Next in thread: Leor Zolman: "Re: [C] functions and 2D arrays?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 8 Jan 2004 19:18:11 -0500 (EST)
On Thu, 8 Jan 2004, Arthur J. O'Dwyer wrote:
>
> typedef int (*foo)[3][3];
>
> tells the compiler -- or you yourself -- to substitute
> 'int (*bar)[3][3]' for every instance of 'foo bar' in the code.
> Roughly speaking, of course. So you would translate
>
> foo myfunc();
> to
> int (*myfunc)()[3][3];
int (*myfunc())[3][3];
> and
> foo myfunc ( foo );
> to
> int (*myfunc)(int (*)[3][3])[3][3];
int (*myfunc(int (*)[3][3]))[3][3];
Yeah... /if/ I practice it enough, I'll get it right...!
-Arthur
- Next message: forums_mp: "Re: reference counting semantics more .."
- Previous message: Arthur J. O'Dwyer: "Re: [C] functions and 2D arrays?"
- In reply to: Arthur J. O'Dwyer: "Re: [C] functions and 2D arrays?"
- Next in thread: Leor Zolman: "Re: [C] functions and 2D arrays?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|