Re: typedef with function pointers
- From: vardhan <vardhanw@xxxxxxxxx>
- Date: Sun, 30 Sep 2007 17:49:58 -0000
On Sep 30, 1:52 pm, Tor Rustad <tor_rus...@xxxxxxxxxxx> wrote:
Googy wrote:
Hi!!
Can any one explain me the meaning of following notations clearly :
1. typedef char(*(*frpapfrc())[])();
frpapfrc f;
2. typedef int (*(arr2d_ptr)())[3][4];
arr2d_ptr p;
3. typedef int (*(*(*ptr2d_fptr)())[10])();
ptr2d_fptr q;
4. typedef char (*(*arr_fptr[3])())[10];
arr_fptr x;
5. typedef float *(*(*(*ptr_fptr)())[10])();
ptr_fptr y;
What are f,p,q,x,y?? and how?
Please don't just answer what they are explain then clearly..
homework-o-meter = 100%
Hint: cdecl
Heres are quick question:
A typical typedef for a data type like a struct goes like:
typedef struct X { ...} XStruct;
where XStruct is now "struct X". Why don't we follow a similar way to
define function pointers? Or is it that the placement of the type
defined follows a similar rule for both these declarations?
-Vardhan
--
Tor <torust [at] online [dot] no>
"To this day, many C programmers believe that 'strong typing' just means
pounding extra hard on the keyboard"
.
- Follow-Ups:
- Re: typedef with function pointers
- From: Eric Sosman
- Re: typedef with function pointers
- From: Ben Bacarisse
- Re: typedef with function pointers
- References:
- typedef with function pointers
- From: Googy
- Re: typedef with function pointers
- From: Tor Rustad
- typedef with function pointers
- Prev by Date: Need help reading file data
- Next by Date: Re: Need help in Global variable in c
- Previous by thread: Re: typedef with function pointers
- Next by thread: Re: typedef with function pointers
- Index(es):
Relevant Pages
|