I'm using openCV and need some callback function. these callback function just accept limited parameters. So, if I need more variables for those function, I must make a global variables and turn it around between functions.
For example, here is the callback function :
void mouse_callback(int event, int x, int y, int flags, void* param);
// params : addition parameter, and just one, I need more parameters for this callback.
// but cannot, so make global variable.
And because I shouldn't do that (make global variable), so I decided to make array of (void*) but I afraid C cannot make this, because size of each members can be different.
My question is : can we make array of (void*), and if not, how can I overcome my problem : use callback function and don't need to make global variable.
Thanks :)
void*?(void*) a[];int *,char *,void *is same size. Just try:void *a[SIZE]void*and back again.