delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/01/28/21:11:44

Date: Sat, 28 Jan 1995 12:05:05 -0800 (PST)
From: Gordon Hogenson <ghogenso AT u DOT washington DOT edu>
To: Jim Gould <jgould AT walnut DOT holli DOT com>
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: Any problems using enumerated data types w/newest release?

On Fri, 27 Jan 1995, Jim Gould wrote:

> I'm trying to define a simple enum for a boolean true/false test, and the
> compiler gives me a parse error before the definitions.  I'm using all the
> latest, newest releases of the utils, libraries, header files, etc. as of
> maint3.
> 

GNU C++ follows the latest working paper of the ANSI/ISO committee.
The type 'bool' was introduced into the language recently, so the
tokens 'bool', 'true' and 'false' are all keywords.   Just use the
built-in bool type instead of defining your own.

Gordon.


- Raw text -


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