读取位置发生访问冲突

pragma once
typedef struct IsNode
{
int data;
struct IsNode*next;
}node,*LinkedStack;
class Stack
{
public:
Stack();
~Stack();
bool empty(node*&top);
void push(node*& top,int x);
bool pop(node*&top, int &x);
void convert( int N);

private:
node*top;

};

#include "pch.h"
#include "Stack.h"
#include"stdio.h"
#include

Stack::Stack()
{
top == NULL;
}

Stack::~Stack()
{
}
bool Stack::empty(node*&top)
{
if (top == NULL)
return true;
else
return false;
}

void Stack::push(node*&top,int x)
{
node*s;
s = new node;
s->data = x;
s->next =top;
top = s;
}

bool Stack::pop(node*&top, int &x)
{
node*u;
if (top == NULL)
return false;
else
{
x = top->data;
u = top;
top = top->next;
delete u;
return true;
}
}
void Stack::convert( int N)
{node *S;
int x;

    do
    {
        push(S, N % 16);
        N /= 16;

    } while (N != 0);
    while (!empty(S))
    {
         pop(S,x );
        if (x > 9)
        {
            x =x + 55;
            printf("%c", x);
        }
        else
            printf("%d",x);


    }
    printf("\n");
}