|
|
Strange Error
#410894
11/10/12 14:56
11/10/12 14:56
|
Joined: Nov 2011
Posts: 139 India
Yashas
OP
Member
|
OP
Member
Joined: Nov 2011
Posts: 139
India
|
int InitilizeApplet(Applet * applet)
{
if(applet->init) { return error("InitilizeApplet:Applet already initilized."); }
void * func = applet->Initilize;
func();
return 0;
}
I get call func_00895 error func() What is tat??
|
|
|
Re: Strange Error
[Re: Yashas]
#410895
11/10/12 15:00
11/10/12 15:00
|
Joined: Apr 2007
Posts: 3,751 Canada
WretchedSid
Expert
|
Expert
Joined: Apr 2007
Posts: 3,751
Canada
|
A void pointer is not a function pointer, Lite-Cs type system won't let you make this call unless you explicitly cast it into a function pointer
Shitlord by trade and passion. Graphics programmer at Laminar Research. I write blog posts at feresignum.com
|
|
|
Re: Strange Error
[Re: Yashas]
#410950
11/11/12 04:04
11/11/12 04:04
|
Joined: Jan 2002
Posts: 4,225 Germany / Essen
Uhrwerk
Expert
|
Expert
Joined: Jan 2002
Posts: 4,225
Germany / Essen
|
Store the function in a void pointer in the struct.
When you need to call the function first assign it to an appropriate prototype - as JustSid pointed out - and then call that prototype.
Always learn from history, to be sure you make the same mistakes again...
|
|
|
|
|
|