摘要: #include #include using namespace std;int main(){ char *a="123"; char *b="456"; char *d="789"; char **c=&a; cout(a) (*c)(a) (*c)(a)... 阅读全文
posted @ 2015-12-29 12:21 小德cyj 阅读(313) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include main(){ char *p; char *q; p=(char*)malloc(25*sizeof(char)); if(p==NULL) exit(1); //q=(char*)malloc(10*sizeof... 阅读全文
posted @ 2015-12-29 10:53 小德cyj 阅读(1046) 评论(0) 推荐(0) 编辑
摘要: delete 释放new分配的单个对象指针指向的内存delete[] 释放new分配的对象数组指针指向的内存那么,按照教科书的理解,我们看下下面的代码:int *a = new int[10];delete a; //方式1delete [] a; //方式2肯定会有很多人说方... 阅读全文
posted @ 2015-12-29 10:18 小德cyj 阅读(1187) 评论(0) 推荐(0) 编辑