📄 main.cpp
字号:
#include <algorithm>
#include <functional>
#include "carray.h"
#include "print.h"
using namespace std;
int main()
{
carray<int,10> a;
for(unsigned i=0;i<a.size();++i)
{
a[i]=i+1;
}
PRINT_ELEMENTS(a,"the value of the array is:");
reverse(a.begin(),a.end());
carray<int,10>::const_iterator pos;
for(pos=a.begin();pos!=a.end();++pos)
{
cout<<*pos<<" ";
}
cout<<endl;
transform(a.begin(),a.end(),
a.begin(),
negate<int> ());
PRINT_ELEMENTS(a);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -