void queue::push(int n)
{
node *temp = new node;
node *p = new node;
temp->data = n;
if (empty())
{
top = temp;
}
else
{
p = top;
// Exception thrown: read access violation
// **p** was 0xCDCDCDCD
while (p->next != NULL)
{
p = p->next;
}
p->next = temp;
}
}
hàm mình viết có gì sai. Với lỗi trên nghĩa là gì. Xin cám ơn.

83% thành viên diễn đàn không hỏi bài tập, còn bạn thì sao?