作者 Anonymous [actionscript] 2007-08-23 08:44 (点击下载)

  1. #include <iostream>
  2. #include <cmath>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. int * ha= new int[3];
  9. ha[0]=1;
  10. ha[1]=2;
  11. ha[2]=3;
  12. cout<<ha[0];
  13. ha=ha+1;
  14. cout<<ha[0];
  15. delete []ha;
  16. return 0;
  17. }
  18.  
  19. //为什么不能ha=ha+1,导致了core dump. 特殊的地址运算理论上应该可以的。

下面的修改已经提交:
提交下面的校正或者修改. (点击这里开始一个新的帖子)
姓名: 在 cookie 中记住我的名字

屏幕抓图:(jpeg 或 png)