Menu

syntax error in enum class

admsasha
2016-03-04
2016-07-25
  • admsasha

    admsasha - 2016-03-04

    enum class LOGLEVEL : int {
    NONE = 0,
    ERROR = 1,
    MINIMUM = 2,
    NORMAL = 3,
    DETAIL = 4,
    FULL = 100
    };

    Why "syntax error" ? Compile ok.

     
  • richardsonkane

    richardsonkane - 2016-03-11

    'm guessing that one of your enums has been previously defined somewhere. For example, the following code snippet duplicates that error message in VC++ 2010:

    **#define CV_GUI_NORMAL 0x00000010

    enum
    {
    CV_GUI_EXPANDED = 0x00000000,
    CV_GUI_NORMAL = 0x00000010
    };****

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.