作者kbjs (kk)
看板EE_DSnP
標題[問題] hw5 一開始compile就不過 看不出原因
時間Sun May 17 19:24:18 2009
一開始compile就不過 看不出原因
訊息如下:
Cleaning util...
Cleaning main...
Removing libutil.a...
Removing adtTest.array...
Checking util...
> compiling: myGetChar.cpp
> compiling: myString.cpp
> compiling: util.cpp
In file included from util.cpp:10:
myUsage.h: In member function a€?double MyUsage::checkMem() consta€?:
myUsage.h:71: error: a€?strncmpa€? was not declared in this scope
myUsage.h:72: error: a€?strchra€? was not declared in this scope
make[1]: *** [util.o] Error 1
Checking main...
> compiling: adtTest.cpp
In file included from ../../include/util.h:14,
from adtTest.cpp:10:
../../include/myUsage.h: In member function a€?double MyUsage::checkMem() consta€?:
../../include/myUsage.h:71: error: a€?strncmpa€? was not declared in this scope
../../include/myUsage.h:72: error: a€?strchra€? was not declared in this scope
make[1]: *** [adtTest.o] Error 1
make: *** [main] Error 2
麻煩老師助教解答
謝謝
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.243.224
1F:→ keyboardle:在myUsage.h裡加上#include <string.h>大概能解決 05/17 19:56
2F:→ kbjs:還是不能過 一樣的訊息 謝謝 05/17 20:00
3F:推 WSzc:那加上 #include <cstring> 試試 05/17 20:17
4F:→ kbjs:過了!! 感恩 多謝 05/17 20:20