看板 NTUEE107HW 關於我們 聯絡資訊
※ 引述《blackmonster (我想我現在沒資格)》之銘言: : 請問要如何new出一個二維陣列啊 看來你沒有認真讀題目喔 ! 題目上有說 : The underlying representation of the double-subscripted array should be a single-subscripted array of integers with rows*columns number of elements. 作法就是像課本 558 業範例中寫的 ptr = new int[size]; 不過現在改成 ptr = new int[rows*columns]; 之後要取得某行某列就得自己換算出是哪個了 , 不過應該不難 ! -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 218.184.80.205