#include <acknex.h>
//
void populate_array(int * array, int arraySize, void * getNextValue)
{
int i;
for(i = 0; i < arraySize; i++)
{
int TempFunction(); // temporary function
TempFunction = getNextValue; // set function pointer
array[i] = TempFunction(); // execute function
}
}
int getNextRandomValue(int a)
{
return a*a;
}
void main()
{
fps_max = 60;
random_seed(0); // initialize random seed
//
int MyArray[8]; // create array
populate_array(MyArray, 2, getNextRandomValue); // fill array with return values of function "getNextRandomValue()"
int TempFunction(int a);
TempFunction = MyArray[0];
int res = TempFunction(2);
printf("%d",res);
}