在 C++ 中如何评估 if 语句?
if ( c )
和 C++ 中的 if ( c == 0 )
一样吗?
Is if ( c )
the same as if ( c == 0 )
in C++?
推荐答案
否,if (c)
与 if (c != 0)
相同.而 if (!c)
和 if (c == 0)
是一样的.
No, if (c)
is the same as if (c != 0)
.
And if (!c)
is the same as if (c == 0)
.
相关文章