error : storage class specified for parameter

前端 未结 7 1717
悲&欢浪女
悲&欢浪女 2021-02-01 11:34

I have a C code written. When I compile it on Linux then in the header file it says the following error: storage class specified for parameter i32 , i8 and so

7条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-01 12:10

    I had similar issue, while error was missing the storage class name in static assignment. E.g.:

    .h:
    class MyClass {
       static const int something;
    }
    
    .cpp:
    const int something = 1; // returns error
    const int MyClass::something = 1; // OK
    

提交回复
热议问题