【C++】怎么样实现一个无限循环

Python96

有用户 提问:怎么样实现一个无限循环

这样实现:要用上以前常用的 while(bool);了,还要用布尔值({ truefalse})中的一个,那你们猜猜会用哪个呢?

回到正轨,我们继续讲解这个知识,你们都知道, while(n){d}是当 n = true时,运行 d所代表的命令。举个例子:

```cpp

include

using namespace std;
int C, g;
int a = 1;
int main() {
while (a 10) {
C++;
#if 0
++C;
#endif
a++;
}
while (b 10) {

输入验证码查看隐藏内容

扫描二维码关注本站微信公众号 Johngo学长
或者在微信里搜索 Johngo学长
回复 svip 获取验证码
wechat Johngo学长