this is my code so far
Code:
// Function that make a linked list to the classNode genus !!!
classNode *Insert_or_Update_Class(classNode *next,classNode *down,classNode *temp,classNode *head){
// Enter name of class and number diversity and check if its not wrong input!!!
do{
printf ("Enter class name:\n");
gets (name);
printf ("Enter diversity:\n");
scanf ("%lf",&diversity);
gets (check);
// here i send the input to a function that check if the input is good !!!
input_check=check_input_class(diversity,name,check);
}while (!input_check);
// start to create or update the class !!!
temp=(classNode*)malloc(sizeof(classNode));
if (!temp)
return NULL;
temp->next=head;
head=temp;
strcpy(temp->name,name);
temp->diversity=diversity;
temp->down=NULL;
temp->next=NULL;
return head;
}//End create_or_update_class//
i dont know if i send the right parameter to the functiovn