delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/28/05:34:29

Date: Tue, 28 Jan 1997 12:26:14 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: cbird <cbird AT byu DOT edu>
cc: djgpp AT delorie DOT com
Subject: Re: enumerated types overloading
In-Reply-To: <32ED20E2.40F3@byu.edu>
Message-ID: <Pine.SUN.3.91.970128122351.10987T-100000@is>
MIME-Version: 1.0

On Mon, 27 Jan 1997, cbird wrote:

> enum alpha {a, b, c, d, e, f};
> 
> in my header and when I try something like:
> 
> alpha letter = a;
> a++;
> 
> I get an error saying no postincrement operator defined or something
> along those lines.

IMHO, this is perfectly justified error message.  You have defined a new 
data type called alpha, but didn't define the meaning of the ++ operator 
on that data type.  C++ doesn't let you use that operator, because it 
doesn't know which code it shoule generate in this case.

- Raw text -


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