B
Bartholomew Simpson
class DateTime
{
public:
typedef enum Format
{
DDMMYY = 0,
DDMMMYY ,
DDMMMYYYY ,
MMDDYY ,
IS08601
};
std::string ToString(const Format fmt= DateTime::ISO8601, const
std::string& sep="-" ) const ;
};
Error: error C2065: 'ISO8601' : undeclared identifier
Why can't the compiler recognizer the enum?
I tried typedefing the enum (although I read its not required in C++ -
same as struct declarations don't need a 'typedef' anymore)
{
public:
typedef enum Format
{
DDMMYY = 0,
DDMMMYY ,
DDMMMYYYY ,
MMDDYY ,
IS08601
};
std::string ToString(const Format fmt= DateTime::ISO8601, const
std::string& sep="-" ) const ;
};
Error: error C2065: 'ISO8601' : undeclared identifier
Why can't the compiler recognizer the enum?
I tried typedefing the enum (although I read its not required in C++ -
same as struct declarations don't need a 'typedef' anymore)