【发布时间】:2016-05-25 03:15:05
【问题描述】:
我看到了一些令我困惑的 c++ 语法
int x = 10;
if(x){ //this line confused me
//code
}
else{
//code
}
我不明白这是什么有效代码,if(x) 是做什么的?
【问题讨论】:
-
Nitpick:可能是语义(使用
int作为if条件)让您感到困惑,而不是语法(文本if(x){)。
标签: c++ if-statement syntax