TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: Neil Heller
from: Jasen Betts
date: 2004-05-07 07:30:02
subject: Function Pointer Redux

Hi Neil.

05-May-04 13:38:00, Neil Heller wrote to Bill Birrell


 >> Bill Birrell wrote in a message to Neil Heller:

 >> Given the following line of code:

 >> typedef void * (*x) (void *)

 >> What does this statement declare?

 >> What is x?

 >> Hi Neil,

 BB>> There is a little utility called cdecl.exe that allegedly answers
 BB>> precisely this type of question. It reports that one as a syntax
 BB>> error.

 BB>> Do you want a copy?

 NH> A copy of the software or of the report?

 NH> Seriously though, I didn't know that typedef(ing) a reserved word
 NH> was kosher (at least that's what I think's going on - redefining a
 NH> pointer to void.  Is this the way you read it, or am I way off
 NH> base again?

no. typdef converts a declaration of x into defining x as a type)
the (void*) bit is part of the declaratuion of x as a pointer to
function...

 -=> Bye <=-

---
* Origin: Keyboard not connected, press to continue. (3:640/1042)
SEEN-BY: 633/267 270
@PATH: 640/1042 531 954 774/605 123/500 106/2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.