class CTest { public: CTest() { Init(); }; void Init() { m_x = 0; }; int m_x; }; error 1566: (Warning -- member 'CTest::m_x' (line 20) might have been initialized by a separate function but no '-sem(CTest::Init,initializer)' was seen)
解决方法在这个类的什么之前,增加注释
//lint -sem(CTest::Init,initializer)
注意:必须是//lint开头,不能是// lint开头 后面的内容无需记忆,直接从提示信息那复制就可以了