gpt4 book ai didi

c++ - 如果这些 {} 只是在代码中间,它们意味着什么?被忽视了吗?

转载 作者:行者123 更新时间:2023-11-30 03:34:24 32 4
gpt4 key购买 nike

<分区>

我的代码中有这个,但是如果我运行这部分将被忽略。这不是函数的一部分,它就在那里,如果我删除这个括号,代码将不起作用。为什么会有这些括号?

bool result = 0;
unsigned int n_comparisons = 0;
{ // what are they for ?
for(int i = 0; i < len; i++)
array[i] = i;
bool result = search<float>(array, len, len/2, n_comparisons);
}// what are they for ?

抱歉我的英语不好。

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