473,473 Members | 2,003 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

enum always undefined

2 New Member
Hello,

I have an enum in one of my classes
Expand|Select|Wrap|Line Numbers
  1. class Config
  2.   {
  3.   public:
  4.     SquareData bg;  //background
  5. ............
The enum looks like this
Expand|Select|Wrap|Line Numbers
  1. enum SquareData{
  2.     OPEN=0 , CLOSED , G_OPEN , G_CLOSED , //GUARANTEED-OPEN AND GUARANTEED-CLOSED
  3.     NJ_OPEN , NJ_CLOSED , NJ_G_OPEN , NJ_G_CLOSED , //NJ = non-join, these cannot be joined br Builders with others of their own kind 
  4.     IR_OPEN , IT_OPEN , IA_OPEN ,        //inside-room, open; inside-tunnel, open; inside anteroom, open
  5.     H_DOOR , V_DOOR ,   //horizontal door, varies over y-axis , vertical door, over x-axis(up and down)
  6.     MOB1 , MOB2 , MOB3 ,   //MOBs of different level            - higher is better
  7.     TREAS1 , TREAS2 , TREAS3 ,  //treasure of different value
  8.     COLUMN 
  9.   };
Whatever value I assign to that enum bg in the constructor of my class, it is always undefined (according to the debugger).

It works in a console application but it does not in a windows forms application

Till
Mar 14 '07 #1
0 1498

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Eric Beyeler | last post by:
I ran into an interesting characteristic of enums... why is comparison between different types allowed? assignment is not allowed ( which I would expect ) enum TESTA { TestA1=4, TestA2=5, };
14
by: Vane | last post by:
According to <<C++ Programming Language>>: > enum flag { x = 1, y = 2, z = 4, e = 8 }; //range 0:15 > ... > flag f4 = flag(99); // undefined : 99 is not within the range of flag But the...
6
by: James Brown | last post by:
Hi, I have the following enum declared: enum TOKEN { TOK_ID = 1000, TOK_NUMBER, TOK_STRING, /*lots more here*/ }; What I am trying to do is _also_ represent ASCII values 0-127 as TOKENs...
3
by: Christopher Crooker | last post by:
We had a function with the signature: Function(Object *, DateTime, DateTime, EnumType) and then changed the class some and there was a 4 parameter function with the signature: ...
1
by: arzewski | last post by:
I don't know what was the reason from a language design point-of-view to allow this, but VB.NET compiler does not flag you (when C# compiler does) when passing an integer value as a parameter to a...
18
by: Visual Systems AB \(Martin Arvidsson\) | last post by:
Hi! I have created an enum list like this: enum myEnum : int { This = 2, That, NewVal = 10, LastItm
2
by: Chowdary Doppalapudi | last post by:
Hi All Is there any way to create the Enum dynamically from database table. Thank Chowdary D
0
by: MikeS | last post by:
Hi, I'm running into a very annoying issue when trying to use an enum defined in a C header file within a Managed C++ application. Within the 'C' header file, there is an enum defined as ...
34
by: Steven Nagy | last post by:
So I was needing some extra power from my enums and implemented the typesafe enum pattern. And it got me to thinking... why should I EVER use standard enums? There's now a nice little code...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.