I would like to declare an enum at class scope, and use that enum as the type of a 
const class member.  I've tried different ways to do it, moved the order around, etc. 
but I can't get it to compile.  Is there a way to do this?
simplified example:

// .h:
class CMyClass  
{
public:

        CMyClass();
        CMyClass(DATASTORED ds); // error C2629: unexpected 'class CMyClass ('
                               // error C2238: unexpected token(s) preceding ';'

        enum DATASTORED
        {
           FIVEHUNDRED,
           ONEHUNDRED,
        };

        const DATASTORED m_dataStored;
}

// .cpp:
CMyClass::CMyClass(DATASTORED ds) :
    m_dataStored(ds)
{}



===========
Jean Palmer
Northrop Grumman
> - [EMAIL PROTECTED]
> ( (410-993-2627)
> 
> 


Reply via email to