Or and not equal

前端 未结 6 687
忘掉有多难
忘掉有多难 2021-01-24 20:23

Why does this work?

#include 
#include 
using namespace std;
int main(){
string s=\"a\";
if((s==\"cm\")||(s==\"in\")||(s==\"ft\")||         


        
6条回答
  •  -上瘾入骨i
    2021-01-24 21:07

    More specifically, you didn't apply De Morgan's law correctly: http://en.wikipedia.org/wiki/De_Morgan%27s_laws.

提交回复
热议问题