struct nodePatient {
struct Patient * patient;
struct nodePatient * next;
};
struct linkedQueue {
struct nodePatient * firstNode;
struct nodePatient * lastNode;
unsigned size;
unsigned maxSize;
};
struct PriorityQueue {
struct linkedQueue * queue;
int size;
unsigned minPriorityValue;
};
struct PriorityQueue * createPriorityQueue(unsigned minPriorityValue) {
struct PriorityQueue * newPriorityQueue = (struct PriorityQueue*) malloc (sizeof (struct PriorityQueue));
newPriorityQueue->queue = (struct linkedQueue*) calloc (minPriorityValue+1, sizeof (struct linkedQueue));
int i;
newPriorityQueue->minPriorityValue = minPriorityValue;
for(i = 0; i < minPriorityValue; i++) {
newPriorityQueue->(queue+i)->maxSize = UNLIMITED_SIZE;
newPriorityQueue->(queue+i)->size = 0;
newPriorityQueue->(queue+i)->firstNode = NULL;
newPriorityQueue->(queue+i)->lastNode = NULL;
}
return newPriorityQueue;
}
This is a part of my code and when i'm trying to compile i'm getting the fallowing errors:
What is it wrong in it?