作者herbert1012 (一定要填喔)
看板EE_DSnP
標題[問題] strcpy
時間Sun Oct 25 17:15:20 2009
我compile後
出現很多錯誤訊息
不意外
但是最後一個是
錯誤: 「strcpy」 在此作用欄位中尚未宣告
有點奇怪
因為cmdParser.h不是有include <string>了嗎?
然後我自己加include "string.h"就沒那個錯誤了
想請教一下是為什麼阿??
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 218.211.52.83
1F:推 flarehunter:strcpy 是c的字串處理函式 放在string.h裡 10/25 17:19
2F:推 yehes2001:#include "string.h" 是c裡面針對char* 的一些functions 10/25 17:19
3F:→ yehes2001:例如: strcpy strcmp. #include <string>是string class 10/25 17:20
4F:→ ilway25:最好是 #include <cstring> 啦.. 10/25 17:36
5F:推 ric2k1:2312 篇不是回過了嗎? 10/25 17:54
6F:推 anfranion:就算要string.h,習慣上應該還是會寫<string.h> 10/25 20:37
7F:→ herbert1012:有耶沒看到那篇 拍謝= = 10/25 20:49