www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/11/05:28:58

From: Erik Max Francis <max AT alcyone DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: enum and djgpp
Date: Thu, 10 Apr 1997 22:45:14 -0700
Organization: Alcyone Systems
Lines: 21
Message-ID: <334DCFEA.297FDA62@alcyone.com>
References: <33494D3F DOT 606307FA AT cs DOT buffalo DOT edu>
NNTP-Posting-Host: newton.alcyone.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

mtc AT acsu DOT buffalo DOT edu wrote:

>     I am just try to do a simple enum like
> 
>     enum constants { false = 0, true = 1};
> 
>     This statement which will compile under other compilers will not
> with djgpp I get a parse error before false and a missing ';' after
> right bracket error. any ideas ?

The reason is because you're likely compiling a C++ program, and DJGPP
conforms to the new C++ standard of having an internal bool type and
keywords true and false.  You can't redefine these.

-- 
       Erik Max Francis, &tSftDotIotE / email / max AT alcyone DOT com
                     Alcyone Systems /   web / http://www.alcyone.com/max/
San Jose, California, United States /  icbm / 37 20 07 N  121 53 38 W
                                   \
                      "The future / is right there."
                                 / Bill Moyers

- Raw text -


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