Ok all of the errors are fixed, now time for some bugs...
So I have this function:
Code:
char* emailGet(char *email)//getting the email
{
users *current;
point:
current = Users
printf("Enter email: ");
scanf("%s",email);
if(strstr(email,"@gmail.com") != NULL && strstr(email,".com") == email+strlen(email)-4 && strstr(email,"@gmail.com") > email)
{
for( ; current->n_user != NULL ; current = current->n_user)
{
if(strcmp(current->email,email) == 0)
{
email = realloc(email,15);
printf("Email already exists, re-enter the email");
goto point;
}
}
return email;
}
else
{
email = realloc(email,15);
printf("Email already exits, re-enter email\n");
goto point;
}
}
For some reason the loop crashes it..