gpt4 book ai didi

c++ - array b; 之间的区别和 int b[5];

转载 作者:行者123 更新时间:2023-11-28 00:31:48 25 4
gpt4 key购买 nike

<分区>

array<int, 5> b = {12,45,12,4};
int B[5] = { 12, 45, 12, 4 };
for (auto item : b)
{
cout << item << endl; // 12,45,12,4, 0
}
cout << endl;
for (auto item : B)
{
cout << item << endl; // 12,45,12,4, 0
}

array<int,5> b 之间有什么区别? ;和 int b[5];

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