error C2220: warning treated as error - no 'object' file generated

前端 未结 5 797
死守一世寂寞
死守一世寂寞 2020-12-15 03:05

I have below class

class Cdata12Mnt
{
public:
    char IOBname[ID1_IOB_PIOTSUP-ID1_IOB_TOP][BOADNAM_MAX + 4];
    char ExIOBname[ID1_MAX_INF-ID1_EXIOB_U1TOP]         


        
5条回答
  •  庸人自扰
    2020-12-15 03:46

    As a side-note, you can enable/disable individual warnings using #pragma. You can have a look at the documentation here

    From the documentation:

    // pragma_warning.cpp
    // compile with: /W1
    #pragma warning(disable:4700)
    void Test() {
       int x;
       int y = x;   // no C4700 here
       #pragma warning(default:4700)   // C4700 enabled after Test ends
    }
    
    int main() {
       int x;
       int y = x;   // C4700
    }
    

提交回复
热议问题