gpt4 book ai didi

c++ - 为什么C/C++中没有||=运算符?

转载 作者:可可西里 更新时间:2023-11-01 16:26:21 27 4
gpt4 key购买 nike

<分区>

Possible Duplicates:
&&= and ||= operators

见标题。这个问题可以扩展到包括所有逻辑+赋值运算符。澄清一下:我不是在谈论 |= 运算符。

另一个例子:&&=

谢谢。

例子:

bool result = false;// Todayresult = result || my_test1();// Do stuffresult = result || my_test2();// In my imagination only...result ||= my_test1();// Do stuffresult ||= my_test2();

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com