C
Craig Klementowski
All,
I've installed the VS 2005 Beta 1 and was trying to build our current
product. I get a compile error when enum value is specified with
classname::enumname::enumvalue. Seems the compiler does not want the
enumname there anymore. This was not a problem with any previous versions of
VS. I could not find any help in any of my programming books or in MSDN. Can
anyone explain the reasons to me? Is this behavior to stay?
class CMyEnumClass
{
public:
enum MyMode
{
MM_Mode1,
MM_Mode2,
MM_Mode3,
MM_Mode4
};
};
int _tmain(int argc, _TCHAR* argv[])
{
// CMyEnumClass::MyMode m = CMyEnumClass::MyMode::MM_Mode3;// in VS 2005 -
error C2825: 'CMyEnumClass::MyMode': must be a class or namespace when
followed by '::'
CMyEnumClass::MyMode m2 = CMyEnumClass::MM_Mode3;//ok in ALL
return 0;
}
Thanks!
Craig Klementowski
I've installed the VS 2005 Beta 1 and was trying to build our current
product. I get a compile error when enum value is specified with
classname::enumname::enumvalue. Seems the compiler does not want the
enumname there anymore. This was not a problem with any previous versions of
VS. I could not find any help in any of my programming books or in MSDN. Can
anyone explain the reasons to me? Is this behavior to stay?
class CMyEnumClass
{
public:
enum MyMode
{
MM_Mode1,
MM_Mode2,
MM_Mode3,
MM_Mode4
};
};
int _tmain(int argc, _TCHAR* argv[])
{
// CMyEnumClass::MyMode m = CMyEnumClass::MyMode::MM_Mode3;// in VS 2005 -
error C2825: 'CMyEnumClass::MyMode': must be a class or namespace when
followed by '::'
CMyEnumClass::MyMode m2 = CMyEnumClass::MM_Mode3;//ok in ALL
return 0;
}
Thanks!
Craig Klementowski