delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/13/19:17:12

From: Bill Currie <bcurrie AT tssc DOT co DOT nz>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: These parse errors are really getting annoying...
Date: Wed, 14 Jan 1998 13:08:00 +1300
Organization: Telecommunication Systems Support Centre
Lines: 24
Message-ID: <34BC01E0.2ADA@tssc.co.nz>
References: <19980113002900 DOT TAA01746 AT ladder02 DOT news DOT aol DOT com>
NNTP-Posting-Host: node106.tssc.co.nz
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

HackerOC3 wrote:
> 
> printf("y value?");
> int y;
> scanf(" %d", &y);
> printf("c value?");
> int c;
> scanf(" %d", &c);
> 
> what's wrong there?  "Parse error before int"
> what gives????!!!!!
> 
> HackerOC3 AT aol DOT com

You're probably compiling this as C rather than C++. gcc selects the
compiler based on the extension: .c=C, .cc,.C,.cxx,.cpp=C++ etc. Note
that gcc is case sensitive (even though dos isn't).  Give your file a
`.cc' extension, and (almost) everything will work nicely (including the
debuggers, there are some problems with gcc and other extensions when it
comes to debugging).

Bill
-- 
Leave others their otherness

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019