I'm getting an error concerning enum (I think)

前端 未结 4 2020
粉色の甜心
粉色の甜心 2020-12-20 16:41

I\'m testing code remotely on a Solaris machine through SSH Secure Shell using c++. Not sure of what version anything is; Solaris, the c++/compiler, etc. (and don\'t know ho

4条回答
  •  自闭症患者
    2020-12-20 17:09

    The include of cmath is defining preprocessor constants OVERFLOW as 3 and UNDERFLOW as 4. So the line declaring the enum becomes (if there are no other constants):

    enum STR_TO_INT_STATUS { SUCCESS, 3, 4, INCONVERTIBLE };
    

    which, of course is not valid syntax.

提交回复
热议问题