[学习笔记]C++17学习第13天
```# include <iostream>
# include <iomanip>
# include <array>
//c++17
using namespace std;
int main()
{
// 习题1
auto values{ array<int,50>{} };
size_t count = size(values);
for(auto p = &values; p!= &values + count; ++p)
{
*p = 2*(p-&values) +1;
}
for(size_t i{}; i!= size(values);++i)
{
cout << setw(4) << values ;
if ((i+1)% 10 ==0) cout << endl;
}
cout << endl;
size_t i{};
auto p = &values+count;
do{
cout << setw(4) << *--p;
if ((i+++1)%10==0) cout << endl;
}
while(p != &values);
}
```
楼主坚持{:1_921:} 楼主加油 楼主加油 第13天了,不错哦。加油 看不懂,能附上讲解吗
页:
[1]