From: "Damian Yerrick" Newsgroups: comp.os.msdos.djgpp References: Subject: Re: Sample C++ code in c.o.m.d Lines: 46 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Message-ID: X-Trace: +rvUKjTImsodX1NVC/lo/SmhOxBS7aT18wT2FMTt5gWYsew/PiePMbgOep65012cw1VPh2sa7b9F!FA+MDthA3Z587QxgSLAV9QTKzVUsTfZ78ukXlgha+XGwVWiQIG/cUPaLZgxO2ML6QHqDawTs X-Complaints-To: abuse AT gte DOT net X-Abuse-Info: Please be sure to forward a copy of ALL headers X-Abuse-Info: Otherwise we will be unable to process your complaint properly NNTP-Posting-Date: Thu, 21 Oct 1999 20:02:00 GMT Distribution: world Date: Thu, 21 Oct 1999 20:02:00 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Eli Zaretskii wrote in message news:Pine DOT SUN DOT 3 DOT 91 DOT 991021141800 DOT 2684T-100000 AT is... > > On Thu, 21 Oct 1999, Damian Yerrick wrote: > > > When I compile some of the sample C++ code I get in > > comp.os.msdos.djgpp, gcc gives me an error. c:/personal/djgpp/include/stdio.h:102: parse error before `va_list' seven times. > Please post the exact error messages and the compilation command > line. Copied straight from the DOSBOX: C:\Windows\Desktop\comp.os.msdos.djgpp>gcc hello.c -o hello.exe hello.c:1: parse error before `:' In file included from hello.c:3: c:/personal/djgpp/include/stdio.h:102: parse error before `va_list' c:/personal/djgpp/include/stdio.h:103: parse error before `va_list' c:/personal/djgpp/include/stdio.h:104: parse error before `va_list' c:/personal/djgpp/include/stdio.h:126: parse error before `va_list' c:/personal/djgpp/include/stdio.h:138: parse error before `va_list' c:/personal/djgpp/include/stdio.h:139: parse error before `va_list' c:/personal/djgpp/include/stdio.h:140: parse error before `va_list' hello.c:11: parse error before `:' file://start of hello.c #include /* c comments are perfectly OK */ file://but comments like this screw up int main(void) { puts("hello comp.os.msdos.djgpp"); return 0; } file://end of hello.c It works fine when I remove the comments. Funny, C comments don't give me any problems.