#include <iostream>
int main()
{
using namespace std;
double * p3 =new double [3];
p3[0]=0.2;
p3[1]=0.5;
p3[2]=0.8;
cout<<"p[1] is "<<p3[1]<<endl;
p3=p3+1;
cout<<"p3+1,now p3[1] is "<<p3[1]<<endl;
// p3=p3-1;
// cout<<"p3-1,now p3[1] is "<<p3[1]<<endl;
// delete [] p3;
delete [] (p3-1);
return 0;
}
09-01
4万+
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
09-01
4万+
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
01-18
1814
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
02-01
791
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-22
755
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)