Originally posted by bugbum1:
in the original code you had
QueueNode *temp;
instead of
struct QueueNode *temp;
Shouldn't it be the other way around?
Since he typedef'd "struct QueueNodeTag" as "QueueNode", he should never use "struct QueueNode". Otherwise what would be the point of using typedef?
I think the problem is in his definition of the Queue struct, where he should have "QueueNode*" instead of "struct QueueNode*" for the head and tail fields.