enums

Started by
11 comments, last by TheJakub 20 years, 9 months ago
It's a shame, C#'s method of forcing you to append the enum name to the front is nice.

I'll get on the VC++ newsgroups and ask about it later on.

Edit: also, I've noticed you can't even forward declare enums. I can't see why though, enums are just converted to ints.

[edited by - antareus on July 7, 2003 9:44:10 AM]
--God has paid us the intolerable compliment of loving us, in the deepest, most tragic, most inexorable sense.- C.S. Lewis
Advertisement
quote:Original post by Thunder_Hawk
#define Status Status::Xnamespace Status {enum X {Fail, Pass};  // First one starts out as zero (I believe that''s guaranteed)}



jesus christ, that is the most hack-a-rific thing I''ve seen in a while.
quote:Original post by Thunder_Hawk
#define Status Status::Xnamespace Status {enum X {Fail, Pass};  // First one starts out as zero (I believe that''s guaranteed)}


er.... which would preprocess to:

namespace Status::X {enum X {Fail, Pass};}


No points for guessing whether that compiles.

How appropriate. You fight like a cow.

This topic is closed to new replies.

Advertisement