Func Ptr Impotence
hi people
i''m tring to make a timing class
that is a class that recieve a pointer to a function
and a time interval.then the object of that timing class will
call the function that was assigned to him, every interval.
this is part of what i made:
/* Constructor that set the interval
and the function being pointed to */
CTiming::CTiming( void (* fPtr)(void) ,int inter)
{
interval = inter;
funcPtr = fPtr;
}
/* Process call the function that
was set to the pointer every interval.*/
void CTiming:rocess(void)
{
if(Time_Passed()) funcPtr();
}
so far so good with compilation but when i create an object:
CTiming Cycle_Frames( Next_Frame ,100);
it gives the following error:
error C2061: syntax error : identifier ''Next_Frame''
does anybody know what i''m doing wrong?
tnx .
0 error(s), 0 warning(s)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement