if(ptr==NULL){printf("error");return -1;}