[問題] 請教boost在complie時所遇到之錯誤問題

看板C_and_CPP作者 (熊貓奶茶)時間10年前 (2014/07/23 13:25), 10年前編輯推噓5(507)
留言12則, 2人參與, 最新討論串1/1
開發平台(Platform): (Ex: VC++, GCC, Linux, ...) VC++ 額外使用到的函數庫(Library Used): (Ex: OpenGL, ...) Boost 1.55, ICU4C 53.1 問題(Question): run底下的source code時, 發生錯誤 http://www.ccfinder.net/download/ccfx-src.zip 錯誤訊息顯示boost::bind參數數量不正確 餵入的資料(Input): 預期的正確結果(Expected Output): 錯誤結果(Wrong Output): 錯誤訊息 https://db.tt/oo21Q49D 程式碼(Code):(請善用置底文網頁, 記得排版) http://codepad.org/42OeXYGe 補充說明(Supplement): 麻煩請板上高手幫忙解惑, 謝謝! -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 114.25.57.51 ※ 文章網址: http://www.ptt.cc/bbs/C_and_CPP/M.1406093120.A.C22.html

07/23 14:28, , 1F
你的argv和argc是main的命列參數?
07/23 14:28, 1F

07/23 14:28, , 2F
然後push_back是你想把牠們放到vector?
07/23 14:28, 2F

07/23 14:40, , 3F
連結為完整程式碼 https://db.tt/cr1wqIw2
07/23 14:40, 3F

07/23 14:43, , 4F
看起來應該是這樣沒錯, source code載完就卡在這err
07/23 14:43, 4F
※ 編輯: pandamilktea (114.25.57.51), 07/23/2014 14:47:07

07/23 14:48, , 5F
程式碼修改為放上較完整之一部份
07/23 14:48, 5F

07/23 15:26, , 6F
那你就直接用algorithm裡的copy不就好了....
07/23 15:26, 6F

07/23 15:27, , 7F
copy(argv,argv+argc,back_inserter(/*你的vector */))
07/23 15:27, 7F

07/23 15:46, , 8F
我這樣編得過欸
07/23 15:46, 8F

07/23 15:58, , 9F
而且錯誤訊息明明是跟你講適用到list的部分有錯
07/23 15:58, 9F

07/23 15:58, , 10F
你怎麼會覺得適用到vector那段有問題
07/23 15:58, 10F

07/23 16:01, , 11F
不對 我看錯了
07/23 16:01, 11F

07/23 16:03, , 12F
應該是這兩行的bind沒傳this
07/23 16:03, 12F
※ 編輯: pandamilktea (114.25.56.224), 08/03/2014 17:11:15
文章代碼(AID): #1JpqT0mY (C_and_CPP)