The struct looks like this:
template <class Node_entry>
Node<Node_entry>::Node(Node_entry item, Node *add_on)
{
entry = item;
next = add_on;
}
And the *new_rear pointer does not get initialized, but &item is filled with user input.
Error_code Extended_queue::append(const Queue_entry &item) {
Node<Queue_entry> *new_rear = new Node<Queue_entry>(item);
if(new_rear = 0)
return overflow;
if(rear = 0){
front = new_rear;
rear = new_rear;
}
else {
rear->next = new_rear;
rear = new_rear;
}
return success;
}
In the locals in VS2010 this and new_rear are both (!) in the next and the entry, the item is good. What am I doing to get this "Access violation writing location 0x00000010." ?