Date: Mon, 21 Aug 2000 12:19:29 +0200 (MET DST) From: pad2369 Message-Id: <200008211019.MAA25583@maggiore.iperbole.bologna.it> To: djgpp AT delorie DOT com, Herby References: <39a05374$0$14726 AT SSP1NO25 DOT highway DOT telekom DOT at> In-Reply-To: <39a05374$0$14726@SSP1NO25.highway.telekom.at> MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 8bit User-Agent: IMP/PHP3 Imap webMail Program 2.0.11 Sender: pad2369 AT iperbole DOT bologna DOT it Subject: Re: Error using clrscr() Reply-To: djgpp AT delorie DOT com Herby : > Following problem occured: > > 1st Pgm.Segment: > #include > main() > { > clrscr(); > printf("Hello"); > } > > Result o.k. No errors > > If only another line is added like this: > > #include > main() > { > clrscr(); > int Zahl; > printf("Hello"); > > } > > The following error occurs: > Error: parse error before 'int' > > What is here wrong ? C does not allow var declaration between two statements, you have to put them all at the beginning of the function. C++ allows this feature. If you name your file with .c extension then gcc will try to compile it using C rules. If you want your file to be compiled as C++ you have to name it with a .cpp or .cc extension. ciao Giacomo ----------------------------------------------------- Giacomo Degli Esposti - pad2369 AT iperbole DOT bologna DOT it