#include<iostream>
using namespace std;
#include<array>
int txt()
{
return 1;
}
int main()
{
int a[5] = { 1,2,3,4,5 };
int b[5];
copy(begin(a), end(a), begin(b));
for (auto e : b)
cout << e << endl;
/*以上不需要array头文件*/
array<int, 5> arr = { 9, 2, 3, 4, 5 };
array<int, 5> copy;
copy = arr;
for (auto e : copy)
cout << e;
}
数组复制[]
最新推荐文章于 2024-05-20 20:08:58 发布