C + Queue + Pointer Problem

Status
You're currently viewing only stickboy's posts. Click here to go back to viewing the entire thread.
Not open for further replies.

stickboy

Ars Tribunus Angusticlavius
6,218
Subscriptor
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.
 
Status
You're currently viewing only stickboy's posts. Click here to go back to viewing the entire thread.
Not open for further replies.