Issue
I'm compiling a c++ project in Eclipse, Linux.
The project was compiled in Windows in the past.
I have my declaration of enums like this:
enum nameofenum:UINT32
{
one=0,
two=1
}
The result is an error in eclipse.
- What is the meaning of
:UINT32
? - How can I switch this declaration to Linux?
Thanks!!
Solution
That looks like a strongly typed enum, which is a C++0x feature. Basically, it specifies the underlying type of the enumeration, so one
and two
will be UINT32
s.
To compile it, you need a compiler that supports this particular part of the C++0x language. I believe GCC 4.4 and Visual C++ supports strongly typed enums to some extent.
Answered By - In silico
Answer Checked By - Gilberto Lyons (JavaFixing Admin)