From: "Tonu Aas" Newsgroups: comp.os.msdos.djgpp References: <3a30b1a8$0$24264 AT diablo DOT uninet DOT ee> <006101c06103$dc9dd020$aa4d57cb AT spunky> Subject: Re: Help! function typedef Date: Mon, 11 Dec 2000 15:12:43 +0200 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.3018.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.3018.1300 Lines: 51 Message-ID: <3a34d45e$0$24309@diablo.uninet.ee> NNTP-Posting-Host: 194.204.53.21 X-Trace: diablo.uninet.ee 976540766 24309 194.204.53.21 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com > typedef int MY_FUNC_TYPE; > > MY_FUNC_TYPE func(void) > { > return 0; > } > > But it looks as if you were looking for a pointer to a function, in which > case you could do this: ... NO NO NO. I wrote: typedef int (MY_FUNC_TYPE)(void); MY_FUNC func { return 0; } This means that I want to declare just function type. And then I can do: MY_FUNC func1 { return 1; } MY_FUNC func2 { return 2; } MY_FUNC func3 { return 3; } ... and struct blablabla { MY_FUNC *handler1; MY_FUNC *handler2; }; In BC 5.02 its o.k., but in DJGPP I cant declare MY_FUNC func { return 0; } Error: syntax error before `{' But: struct blablabla { MY_FUNC *handler1; MY_FUNC *handler2; }; compiles fine !!! Help somebody help! Tõnu.