以下陈述的含义? [英] Meaning of following statement?
本文介绍了以下陈述的含义?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
if(!Null)
{
任何陈述
}
这个条件是什么意思我不明白。
或者如果我们没有条件我们可以写入if()但我们想要使用如果那么什么我们会用括号写吗?????
我尝试了什么:
如果在括号中写出简单的条件,那么我们都知道它们的含义但是如果
!在任何条件的开始目前,它是什么意思
解决方案
在C ++中!运算符是逻辑NOT: C中的运算符|第2组(关系和逻辑运算符) - GeeksforGeeks [ ^ ] - 它会反转它后面的布尔值。
如果你有这个代码:
< pre lang =c ++> if (!a)
b
else
c然后当
a
评估为true
时,你将执行c
,当它的计算结果为false
时,你将执行b
昨天我给你一个链接,它将解释有关C ++语言的所有内容。请使用它。
嗯......你问的是关于C ++代码含义的问题......
那么,你为什么不买一本书并从基础开始呢?另一种方法是研究教程,正如Richard已经建议的那样...
C ++语言 - C ++教程 [ ^ ]
C ++教程 [ ^ ]
学习C ++教程 - javatpoint [ ^ ]
if(!Null)
{
any statements
}
what is meant by this condition i dont understand.
Or if we have no condition which we can write in if() but we want to use if then what would we write in brackets?????
What I have tried:
if simple conditions are wrote in brackets then we all know their meaning but if
! in present at the start of any condition then what is meant by it
解决方案
In C++ the ! operator is logical NOT: Operators in C | Set 2 (Relational and Logical Operators) - GeeksforGeeks[^] - it inverts the boolean value that follows it.
If you have this code:
if (!a) b else cThen when
a
evaluates totrue
you will executec
, and when it evaluates tofalse
you will executeb
I gave you a link yesterday which will explain everything about the C++ language. Please make use of it.
Well... you're asking the questions about meaning of C++ code...
So, why don't you buy a book and start with basics? The other way is to study tutorials, as Richard has already suggested...
C++ Language - C++ Tutorials[^]
C++ Tutorial[^]
Learn C++ Tutorial - javatpoint[^]
这篇关于以下陈述的含义?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文