64,654
社区成员
发帖
与我相关
我的任务
分享
#include<algorithm>
#include<iostream>
int main(void)
{
int a1[]{0,1,2,3,4,5,6,7,8,9};
int a2[sizeof(a1)/sizeof(*a1)];
//std::copy(std::begin(a1),std::end(a1),std::begin(a2));
std::copy(std::begin(a1),std::end(a1),a2);
for(const auto &i:a2)
std::cout<<i<<' ';
std::cout<<std::endl;
return 0;
}
,