C++中静态成员变量与静态成员函数,以及malloc , free , new , delete ,区别

int * p = (int * ) malloc(sizeof(int) ) ;  int * p = (int * ) malloc(sizeof(int)*10);   生成一个数组的空间 int * p = new int (10) ;  生成一个int型内存空间,并指向 10  int * p = new int[10]  ;  生成数组的空间。 也可以用malloc 来生成类对象空间
相关文章
相关标签/搜索