Whats wrong in it ? it shows me segmentation fault WHY?

#include
using namespace std;
class node{
public:
int data;
node * next;
node(int d){
data = d;
next = NULL;
}
};
void create_list(node *& head , int data){
if(head == NULL){
head = new node(data);
}
else{
node * temp = head;
while(temp->next!=NULL){
temp = temp->next;
}
temp = new node(data);
}
}
void move_k_steps(node *& fast , int k){
while(k–){
fast = fast->next;
}
}
void last_k_element(node * head, int k){
node * fast = head;
node * slow = head;
move_k_steps(fast , k);
while(fast != NULL){
fast = fast->next;
slow = slow->next;
}
cout<data<<endl;
}

int main() {

node * head = NULL;
int n;
cin>>n;
while(n != -1){
	create_list(head , n);
	cin>>n;
}
int k;
cin>>k;
last_k_element(head , k);

return 0;

}

hey, it is very hard to detect an error in an unindented code, please can you provide me the link to ide.codingblocks.com by pasting ur actual code there,
in the meantime, here is the correct code u can refer to
https://ide.codingblocks.com/s/221867