[問題] VC++ #include的問題
看板C_and_CPP (C/C++)作者closeryou (歡 迎 光 伶 唷!!!)時間15年前 (2011/03/15 23:47)推噓3(3推 0噓 12→)留言15則, 4人參與討論串1/1
開發平台(Platform):VC++
額外使用到的函數庫(Library Used):OpenCV 以及 OpenSurf
問題(Question): 有兩個關於#include的問題
1.一開始我的程式碼如下面第一種情況(就是都沒有打副檔名)
且#include的順序如下一樣
但在debug的時候會出現以下的error
fatal error C1083: 無法開啟包含檔案: 'ipoint': No such file or directory
我今天隨便換了順序,把#include<ipoint>跟#include<surf>的順序調換
錯誤就變成了無法開啟包含檔案: 'surf': No such file or directory
可是我確定我都有在工具-->選項-->VC++目錄去include阿~~
我問學長們的結論是
他們建議我把附檔名都打上去
不管是.h還是.cpp都要標上
2.我打了之後
錯誤變成了三個
error C4430: 遺漏型別規範 - 假設為 int。注意: C++ 不支援 default-int
error C2146: 語法錯誤 : 遺漏 ',' (在識別項 'src_corners' 之前)
error C2660: 'translateCorners' : 函式不使用 3 引數
請問我是耍笨了甚麼了嗎@@
不是在工具-->選項-->VC++目錄有設定好
然後電腦就會去找到哪裡該include嗎
為什麼會出現問題一呢
我把附檔名都打上去後就變成了其他的錯誤
所以可以說是其實電腦有include到
但是是因為某個原因所以出現問題一嚕
呼~~好像很難懂(也許是個很笨的問題啦~~)
真的希望能有人能看懂我的問題~~
並且給予一點指導
謝謝各位^^
預期的正確結果(Expected Output):沒出錯
錯誤結果(Wrong Output):
問題一程式碼(Code):
#include <ipoint>
#include "surflib.h"
#include "kmeans.h"
#include <ctime>
#include <iostream>
#include <surf>
#include <fstream>
#include <fasthessian>
#include <integral>
問題二程式碼(Code):
#include <ipoint.h>
#include "surflib.h"
#include "kmeans.h"
#include <ctime>
#include <iostream>
#include <surf.h>
#include <fstream>
#include <fasthessian.h>
#include <integral.h>
補充說明(Supplement):大家好,我是剛學VC++沒多久的新人
來這邊向大家討教求助
可是因為真的太嫩了
所以也許敘述問題的方式大家會聽不董
如果真的不懂的話我會再盡力跟大家解釋的
先謝謝各位先拜了
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.138.139.109
→
03/15 23:51, , 1F
03/15 23:51, 1F
推
03/15 23:52, , 2F
03/15 23:52, 2F
→
03/15 23:52, , 3F
03/15 23:52, 3F
推
03/16 00:05, , 4F
03/16 00:05, 4F
→
03/16 00:34, , 5F
03/16 00:34, 5F
→
03/16 00:39, , 6F
03/16 00:39, 6F
→
03/16 00:41, , 7F
03/16 00:41, 7F
→
03/16 00:43, , 8F
03/16 00:43, 8F
→
03/16 00:44, , 9F
03/16 00:44, 9F
→
03/16 00:44, , 10F
03/16 00:44, 10F
→
03/16 00:45, , 11F
03/16 00:45, 11F
→
03/16 01:13, , 12F
03/16 01:13, 12F
推
03/16 01:18, , 13F
03/16 01:18, 13F
→
03/16 01:18, , 14F
03/16 01:18, 14F
→
03/17 22:01, , 15F
03/17 22:01, 15F
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章