Problems relating to conditional statements and fuctions.
Hi.
I need help. I would like to have a function that returns to it's parent function if conditions are not met, however my code will not compile. I am using Xcode 3. Here is the non functioning code:
Code:
#include <stdio.h>
void first(void);
int main()
{
first();
printf("first completed successfully");
}
void first(void){
int welcome;
scanf( "%d", &welcome );
fpurge( stdin );
if(welcome == ""){
return();
}
else{
first();
}
}
Thanks to anyone who can help.