I did have the same problem as you probably for the reason tabstop mentioned. I was reusing the same variable to add data. Alloc new memory for each piece of data that you add to the queue.
Type: Posts; User: noops
I did have the same problem as you probably for the reason tabstop mentioned. I was reusing the same variable to add data. Alloc new memory for each piece of data that you add to the queue.
Do you need memcpy? Couldn't you just set new_node->data = item?
I am actually working on the same thing as you right now. And that is the approach I am taking.