討論串[問題] 有關delete與陣列
共 2 篇文章
首頁
上一頁
1
下一頁
尾頁
內容預覽:
一.new的使用. 乖乖用迴圈填floor(log(n)/log(2))+1的值吧. 除非你只要填開頭幾個元素的值,可以這樣用. int * x = new int[4]{1,3};//1,3,0,0. 二.陣列與函數的基礎概念. 1.陣列不能作為函數參數. int* Preprocess(int
(還有168個字)
內容預覽:
不好意思,我是剛學C++的新手,問題可能很基本. 我寫了一個函式大概長這樣. int* Preprocess(int a[], int n). {. int* sparse = new int[n][floor(log(n)/log(2) )+ 1];. .................... r
(還有51個字)
首頁
上一頁
1
下一頁
尾頁