Date: Thu, 15 Jan 1998 19:13:35 +0200 (IST) From: Eli Zaretskii To: HackerOC3 cc: djgpp AT delorie DOT com Subject: Re: parse errors In-Reply-To: <19980115130300.IAA15160@ladder01.news.aol.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On 15 Jan 1998, 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!! You are obviously assuming that this code will be compiled as C++ (it is illegal in C to put declarations such as "int y;" after executable statements). But GCC compiles *.c files as C, not C++, so you get burned. You need to rename your source file to have a .cc extension, then it will work.