There are errors in this code that im having, i believe i have narrowed it down to a node of the variable Type pointing to the value int, there is no conversion for this. BUT according to my teacher this is how the code works and my error is somewhere else in my code.
The purpose of the program is to take the function count and make it return the number of elements in the queue using nodes in some complicated way.
I get this errors:
header.h
1) line 59 while (queueFront!= NULL) //while there are elements left
warning is "NULL used in arithmetic".
2) line 63 queueFront = queueFront->link; //advance first to the
queueFront->link is not a pointer. So it do not have "->link". It is "int queueFront;"
3) line 93 if (queueFront == NULL) //if initially the queue is empty
warning is "NULL used in arithmetic".
4) line 100 queueRear->link = newNode;
queueRear->link is not a pointer. So it do not have "->link". It is int queueRear;"
okay let me rephrase my question, my teacher has the code the way she wants it, and i have to figure ways around these errors but how do you go about fixing errors?
When I fix errors I often start fixing the error that is reported first. Later errors could be caused by earlier errors so often it's enough fixing the first error and most of the other errors will be gone.