[問題] 初學請教:計數排序問題
開發平台(Platform): (Ex: Win10, Linux, ...)
Win10
編譯器(Ex: GCC, clang, VC++...)+目標環境(跟開發平台不同的話需列出)
MinGW + VS Code
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
問題(Question):
大家好我是C++初學者在練習這個問題時
http://bit.ly/2yTqpHW
進入countSort function後會回不到main function
我的錯誤是進到
C:\MinGW\lib\gcc\mingw32\6.3.0\include\c++\ext\new_allocator.h
void
deallocate(pointer __p, size_type)
{ ::operator delete(__p); }
產生error
不知道是不是我VS Code沒裝好有問題還是?
餵入的資料(Input):
預期的正確結果(Expected Output):
錯誤結果(Wrong Output):
進入countSort function後會回不到main function
程式碼(Code):(請善用置底文網頁, 記得排版,禁止使用圖檔)
http://bit.ly/2yTqpHW
補充說明(Supplement):
初次在這個版發文,有錯請見諒><
--
jkkert:https://imgur.com/JhKKuFX

jkkert:汪汪汪汪汪
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.96.89.26
※ 文章網址: https://www.ptt.cc/bbs/C_and_CPP/M.1541492180.A.399.html
→
11/06 16:47,
7年前
, 1F
11/06 16:47, 1F
d大可以再說明清楚一點嗎?
因為我設breakpoint 在那段迴圈之後是可以執行的
不知道該怎麼改比較好?
謝謝
※ 編輯: jkkert (140.96.89.26), 11/06/2018 17:10:10
推
11/06 18:04,
7年前
, 2F
11/06 18:04, 2F
→
11/06 18:05,
7年前
, 3F
11/06 18:05, 3F
我剛剛試過那段只跑3個迴圈也有問題QQ
看起來不是越界
我再debug看看,謝謝
※ 編輯: jkkert (140.96.89.26), 11/06/2018 18:12:38
推
11/07 00:07,
7年前
, 4F
11/07 00:07, 4F
→
11/07 00:07,
7年前
, 5F
11/07 00:07, 5F
→
11/07 00:49,
7年前
, 6F
11/07 00:49, 6F
debug完了,謝謝大家~~~
※ 編輯: jkkert (140.96.89.26), 11/07/2018 08:43:39
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章