I want to initialise my a variable with queue type. But im running into a bit of trouble. The warning says incompatible pointer to integer conversion assigning to int. What does this mean?
#include <stdio.h>
#include <stdlib.h>
#define MAX 4
struct queue
{
int array[MAX];
int front;
int back;
};
typedef struct queue Queue;
Queue qInit(Queue table[], int front, int back);
int main(void)
{
Queue table[MAX];
int front, back;
qInit(table, front, back);
return 0;
}
Queue qInit(Queue table[], int front, int back)
{
Queue c;
c.array[MAX]=table; // <---- getting warning right here.
c.front=front;
c.back=back;
return c;
}