help, C problem
Posted: Fri Feb 20, 2009 7:52 am
Hello. I'm experienced in Game maker, but Im just starting to learn C.
my problem is, when I use a function, it works once, and then doesn't work again until i call main() and even then, other input fields don't work. it writes the string I put into the "continue" field into the "name"field.
I know this is confusing, but if anyone can help, it would be appreciated. here is the code.
int wait();
...
int wait()
{
char n;
printf("\ncontinue (y)?");
scanf("%d",n);
}
...
my problem is, when I use a function, it works once, and then doesn't work again until i call main() and even then, other input fields don't work. it writes the string I put into the "continue" field into the "name"field.
I know this is confusing, but if anyone can help, it would be appreciated. here is the code.
int wait();
...
int wait()
{
char n;
printf("\ncontinue (y)?");
scanf("%d",n);
}
...