My enum is not a class or namespace

前端 未结 4 1939
南笙
南笙 2020-12-05 06:14

Hi I have files called MyCode.h and MyCode.cpp

In MyCode.h I have declared

enum MyEnum {Something = 0, SomethingElse = 1};

class MyClass {

MyEnum e         


        
4条回答
  •  温柔的废话
    2020-12-05 06:58

    Indeed, C++0x allows that feature. I could enable it successfully in gcc using this command line flag: -std=c++0x

    This was with gcc version 4.4.5

提交回复
热议问题