 When i'm trying to delete the first number of list, something went wrong when i print the list?
 Can anyone help me? Thanks so much T_T.

Here my code:
include <stdio.h>
include <conio.h>
include <stdlib.h>
struct node {
int inf;
node *next;
};node *insert_head(node *first, int data);
node *insert_last(node *first, int data);
int is_empty(node *first);
int find_max(node *first);
int counting_ele(node *first);
int print_list(node *first);
node *detele(node *, int dat);int main(){
node *head = NULL;
char choose;
while(1){
system("cls");
printf("\t Menu\n 1.Insert to head\n 2.Insert to last\n 3.Number of elements\n 4.Delete\n 5.Print list\n 0.Exit!");
printf("\n Your choose (16): "); scanf("%c", &choose);switch(choose){ case '1': system("cls"); int value; printf("> Enter value you want to add to head of list: "); scanf("%d", &value); head = insert_head(head, value); printf("\nSuccessfull, press any key to return menu!"); getch(); break; case '2': system("cls"); int value1; printf("> Enter value you want to add to last of list: "); scanf("%d", &value1); head = insert_last(head, value1); printf("\nSuccessfull, press any key to return menu!"); getch(); break; case '3': system("cls"); if (is_empty(head)) printf(">List is empty!"); else printf(">List has %d elements!", counting_ele(head)); getch(); break; case '4': system("cls"); printf("Enter number: "); int num; scanf("%d", num); //std::cout << num; detele(head, num); printf("\nSuccessfull, press any key to return menu!"); getch(); break; case '5': system("cls"); printf("> Printing all elements: "); printf("\nResult: "); if (!print_list(head)) printf("List is empty!"); getch(); break; case '0': return 1; default: break; } }
}
node *insert_head(node *first, int data){
node *tmp;
tmp = new node;
tmp>inf = data;if (!first){ first = tmp; tmp>next = 0; } else { tmp>next = first; first = tmp; } return first;
}
node *insert_last(node *first, int data){
node *tmp, *run;
tmp = new node;
tmp>inf = data;
if(!first) {
tmp>next = 0;
first = tmp;
}
else {
run = first;
while(run>next) {
run = run>next;
}
run>next = tmp;
tmp>next = 0;
}
return first;
}int is_empty(node *first){
return !first;
}int find_max(node *first){
node *run = first;
int max = 0;
while (run){
if (run>inf > max) max = run>inf;
run = run>next;
}
return max;
}node *detele(node *head, int dat){
node *tmp;
if (head>inf == dat){
tmp = head;
head = head>next;
delete tmp;
} else {
node *run = head;
while(run>next && run>next>inf != dat){
run = run>next;
}
if(!run>next){
printf("Can't not find!");
return head;
} else {
tmp = run>next;
run>next = tmp>next;
delete tmp;
}
}
return head;
}int counting_ele(node *first){
node *run;
int count = 0;
run = first;
while(run){
count++;
run = run>next;
}
return count;
}int print_list(node *first){
node *run;
if (is_empty(first)) return 0;
else {
run = first;
while(run){
printf("%d ", run>inf);
run = run>next;
}
return 1;// run = first;
// if(run) print_list(run>next);
// printf("%d ", run>inf);
// return 1;
}
}
0