In C, you can cast a function pointer to void, can the TI C/C++ compiler do that? For example:
int increase(int abc){
abc++;
return abc;
}
void main(){
unsigned int FnPtr[50];
fnPtr[5] = (unsigned int)increase; // this does not work, bu this is what I need to work
// then I need to cast back to function pointer
int b;
b = ((int (*)(int))(fnPtr+5)(6);
}
I need to place function pointers and data into unsigned int array[], how can I make this work in TI C/C++ compilers. It works on MinGW C++ (size of unsigned int and pointer on my MinGW system is the same)
