c++ - 条件表达式中的子表达式什么也不做怎么表示?
ringa_lee
ringa_lee 2017-04-17 12:05:25
0
1
868
 <表达式1> ? <表达式2> : <表达式3>

比如说我想让表达式2什么也不干,但语法又要求必须要有内容才行,这时候写什么好?

ringa_lee
ringa_lee

ringa_lee

reply all(1)
Ty80

It is better to write if to decide whether to execute expression 3. It is impossible for expression 2 to execute the method, and this ternary expression has lost its meaning.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!