const int *ptr = new const int[100](); //const必須經過value-initialized
char *cp = new char[0]; //合法,但不能提領cp
char arr[0]; //不合法,不能定義長度為0的array
delete [ ] ptr; //釋放動態記憶體
文章標籤
全站熱搜
const int *ptr = new const int[100](); //const必須經過value-initialized
char *cp = new char[0]; //合法,但不能提領cp
char arr[0]; //不合法,不能定義長度為0的array
delete [ ] ptr; //釋放動態記憶體