[問題] class method 回傳使用自定義型別
開發平台(Platform): (Ex: VC++, GCC, Linux, ...)
gcc
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
none
問題(Question):
請問在第34行的部份回傳值 Info 為什麼會需要寫成 test::Info 呢?
後面的參數就可以直接寫 Range 而不需要寫成 test::Range
整個 method 已經寫成 test::generateInfoVector ,
回傳值 Info 為什麼不會直接到 test 底下尋找定義?
程式碼(Code):(請善用置底文網頁, 記得排版)
https://ideone.com/6yVn3O
補充說明(Supplement):
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 118.170.15.95
※ 文章網址: https://www.ptt.cc/bbs/C_and_CPP/M.1427426912.A.6CD.html
推
03/27 11:32, , 1F
03/27 11:32, 1F
→
03/27 11:33, , 2F
03/27 11:33, 2F
→
03/27 12:06, , 3F
03/27 12:06, 3F
→
03/27 13:32, , 4F
03/27 13:32, 4F
→
03/27 13:39, , 5F
03/27 13:39, 5F
→
03/27 13:48, , 6F
03/27 13:48, 6F
→
03/27 13:49, , 7F
03/27 13:49, 7F
→
03/27 13:49, , 8F
03/27 13:49, 8F
→
03/27 14:19, , 9F
03/27 14:19, 9F