pjmitchell <[EMAIL PROTECTED]> wrote:

> I want to create a global variable that I can set and use to call one of 
> several different functions. I haven't been able to get it to work. Are 
> there any examples that might help me with this?

// prototypes of the functions you want to point to
int red(int count, double intensity);
int blue(int count, double intensity);
int green(int count, double intensity);

// declare fnpointer as pointer to function taking (int, double), and
// returning int
int (*fnpointer)(int, double);

int result;
fnpointer = red;
result = fnpointer(1, 5.0);


--
Roger Chaplin
<[EMAIL PROTECTED]>

Reply via email to