vc里 if(!ret) 里面的感叹号是什么意思啊
来源:百度知道 编辑:UC知道 时间:2024/06/16 08:44:23
if(!ret) 就是if(ret==0)的意思
!是取反
if(ret) 就是 if(ret!=0)
逻辑运算符号之一
单目运算符号
对操作数取逻辑非
说明:
a为true则!a为false
a为false则!a为true
!ret 即为 ret==0
逻辑非
逻辑非,取反
!是非运算符号
例如 !(a==b)等价于a!=b
!(a<10)等价于a>=10