M
marco_segurini
Hi,
I like to know why in a enum the inizializator has to be fully
qualified even if it belongs to the enumeration.
Many thanks.
Marco.
//--- code
#include "stdafx.h"
using namespace System;
enum class ENUM_ID_TIPO_NODO
{
TNP_MIN = 0x80,
TNP_1 = ENUM_ID_TIPO_NODO::TNP_MIN, // ok
//TNP_1 = TNP_MIN, // error C2065: undeclared identifier
TNP_2,
TNP_3,
TNP_4,
TNP_5,
TNP_MAX
};
int _tmain()
{
ENUM_ID_TIPO_NODO en = ENUM_ID_TIPO_NODO::TNP_MIN;
return 0;
}
I like to know why in a enum the inizializator has to be fully
qualified even if it belongs to the enumeration.
Many thanks.
Marco.
//--- code
#include "stdafx.h"
using namespace System;
enum class ENUM_ID_TIPO_NODO
{
TNP_MIN = 0x80,
TNP_1 = ENUM_ID_TIPO_NODO::TNP_MIN, // ok
//TNP_1 = TNP_MIN, // error C2065: undeclared identifier
TNP_2,
TNP_3,
TNP_4,
TNP_5,
TNP_MAX
};
int _tmain()
{
ENUM_ID_TIPO_NODO en = ENUM_ID_TIPO_NODO::TNP_MIN;
return 0;
}