[問題] C++ vector 使用問題
開發平台(Platform): (Ex: VC++, GCC, Linux, ...)
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
問題(Question): 我有一個一維vector:vector<int> vec,裡面有50個數據,
我想把這些數據複製到一個二維矩陣:int arr[5][10],請問我該怎麼實現呢?
餵入的資料(Input):
預期的正確結果(Expected Output):
錯誤結果(Wrong Output):
程式碼(Code):(請善用置底文網頁, 記得排版)
補充說明(Supplement):
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 111.246.181.194
→
08/10 14:07, , 1F
08/10 14:07, 1F
→
08/10 14:07, , 2F
08/10 14:07, 2F
推
08/10 14:08, , 3F
08/10 14:08, 3F
推
08/11 11:00, , 4F
08/11 11:00, 4F
→
08/11 11:03, , 5F
08/11 11:03, 5F
→
08/11 11:03, , 6F
08/11 11:03, 6F
→
08/11 11:04, , 7F
08/11 11:04, 7F
→
08/11 11:04, , 8F
08/11 11:04, 8F
→
08/11 11:08, , 9F
08/11 11:08, 9F
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章