簡單總結:堆與棧的區別

參考:http://blog.csdn.net/cc214042/article/details/52728924 使用堆與棧,一維數組 1 //定義長度爲size的數組 2 //在棧上 3 int array[size]; 4 5 //在堆上 6 //C++語法 new delete 7 int *array = new int[size] 8 //釋放 9 delete
相關文章
相關標籤/搜索