编译出现的警告:unsafe mix of type......,不知道为何?
在菜单调用模式对话框,要判断对话框里的成员变量,为什么会出现这样的警告?怎样解决?
warning C4805: '==' : unsafe mix of type 'int' and type 'const bool' in operation
代码如下:
if(LoginDlg.DoModal()==IDOK){
if(LoginDlg.m_bLegal==true){
问题就出在这里,难道int和bool不能放在一起比较?