看板 EE_DSnP 關於我們 聯絡資訊
我在make test時 他說'myStr2Int' was not declared in this scope 我知道myStr2Int是在string.cpp裡面 我是應該要自己把它include進來嗎? 還是我哪裡弄錯了呢? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.4.181
ric2k1:哪一個檔案有用到 myStr2Int? 10/31 02:26
pigs57052000:calcModNum.h裡面的getStrVal不是叫我們用嗎? 10/31 02:45
ypf791:1) 把getStrVal移到.cpp定義 2) 在.h裡include "util.h" 10/31 09:08
pigs57052000:compile沒有error了 但我ref/testMC-64執行的結果是 10/31 11:26
pigs57052000:Error: using testMC <int> <int> <int>!! 10/31 11:26
pigs57052000:這又是哪裡出問題了嗎? 10/31 11:27
steve1012:你要打./testMC 1 2 3才行 後面要給他三個參數 10/31 11:33
steve1012:然後因為一般function會打在.cpp裡面所以.h沒有幫你 10/31 11:34
steve1012:include util.h 10/31 11:34