Trying to make fill an array of pointers of a known size with blocks of memory I can later fill with names/pointers to said names. but when i go to compile it returns the following warning: assignment makes integer from pointer without a cast 'opList[0] = (int*)malloc(sizeof(char)....'
any idea whats going on here and how to clear the warning?
#define QUE_SIZE 256
#define MAX_REWARDED 21
#define TWITCH_MAX 1 /*Temp*/
int main ()
{
int* opList[5] = {NULL};
setup(&opList);
}
void setup(int* opList)
{
int *x;
int *y;
opList[0] = (int*)malloc(sizeof(char) * QUE_SIZE * TWITCH_MAX); /*currentNames*/
opList[1] = (int*)malloc(sizeof(int) * MAX_REWARDED); /*correctAnswers*/
opList[2] = (int*)malloc(sizeof(int) * QUE_SIZE); /*chronoQue*/
opList[3] = (int*)malloc(sizeof(int) * QUE_SIZE); /*rewardQue*/
opList[4] = NULL; /*End in NULL to make garbage collection easy*/
}