数组越界检查

hello1超出范围:超出范围:2超出范围:超出范围:上面啊是结果:程序:#include<iostream>using namespace std;class A{ public: A(int l){length=l;size=new char[length];} ~A(){delete [] size;} int getlength(){return length;} char&amp;operator[](int i); private: int length; char*size; };ch...
默认分类 | 2011-10-29 19:29 | 阅读 598 次 | 评论 0 条
浏览598次
文章分类
文章归档
最新评论