Why am I getting Runtime error?

# include<bits/stdc++.h>
using namespace std;
class A{
    public:
    A *next = NULL;
    int value;
};

int main(){
    
    
    A *a ,*d , *m;
    
    A s;
    a=&s;
    m =a;
    for(int i=0;i<5;i++){
        a->value = i;
        if(i < 4){
        A s;
        d=&s;
        a->next = d;
        a = d;
        }
    }
    
    while(m!=NULL){
        cout<<m->value<<endl;
        m=m->next;
    }
    
    
}

here & works as reference operator and & is also used for address.

are both same reference and address?