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