Mail Archives: djgpp/1998/01/16/11:46:15
HackerOC3 wrote:
>printf("y value?");
>int y;
>scanf(" %d", &y);
>printf("color value?");
>int c;
>scanf(" %d", &c);
> In above code, i get parse errors before int. I also sometimes get parse
> errors in function prototypes for seemingly invaild reasons. Please help!!
>
C is not C++. You must declare your variables at the top of your scope.
{
int y, c;
printf("y value?");
scanf(" %d", &y);
printf("color value?");
scanf(" %d", &c);
}
--
Charles Krug, Jr.
- Raw text -