www.delorie.com/djgpp/bugs/show.cgi   search  
Bug 000123

When Created: 11/17/1996 02:44:23
Against DJGPP version: 2.01
By whom: mork@vcn.bc.ca
Abstract: Incrementing enumerated variables causes post-increment error in c++
I have found that defining an enumerated variable and then incrementing it using the simple post-increment operator (ie. happy++ where happy is the enum variable) causes an error. However, using "happy=happy+1" works fine.

Note added: 11/17/1996 02:47:01
By whom: mork@vcn.bc.ca
the exact error is that there is no post-increment operator for type. i am assuming the compiler lacks a routine to handle post-incrementation of enumerated variables.

Closed on 04/13/1999 07:00:50: This is not a bug at all. User should have written an operator.
By whom: eliz@is.elta.co.il

  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2010   by DJ Delorie     Updated Jul 2010