[問題] include 新的cpp debug 會出現問題
開發平台(Platform): (Ex: VC++, GCC, Linux, ...)
VS2013
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
opencv
問題(Question):
新建的cpp 要正確debug 都要重建專案
否則會顯示之前dubug的結果
下面範例 第一次debug 會正確 顯示 Test1 Test1
但若把a.cpp b.cpp cout 都改 Test2
在debug 會顯示 Test2 Test 1 而不是 Test2 Test2
唯有重建後才會都正確顯示 ? 但我不太懂這問題
後來我有測試接下來建的cpp 都會這樣 但不知道哪裡出問題?
*[36m餵入的資料(Input):*[m
*[36m預期的正確結果(Expected Output):*[m
*[36m錯誤結果(Wrong Output):*[m
*[36m程式碼(Code):(請善用置底文網頁, 記得排版) *[m
main.cpp
#include "global.h"
#include "a.cpp"
#include "b.cpp"
int main()
{
a ob1;
b ob2;
a.init();
b.init();
return 0 ;
}
a.cpp
#include "global.h"
class a
{
private :
Mat img;
int height, width;
public:
void init( )
{
cout << "Test1" << endl;
}
};
b.cpp
#include "global.h"
class b
{
private :
Mat img;
int height, width;
public:
void init()
{
cout << "Test1" << endl;
}
};
補充說明(Supplement):
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.113.193.236
※ 文章網址: https://www.ptt.cc/bbs/C_and_CPP/M.1453967276.A.189.html
→
01/28 16:02, , 1F
01/28 16:02, 1F
推
01/28 17:04, , 2F
01/28 17:04, 2F
→
01/28 17:05, , 3F
01/28 17:05, 3F
→
01/28 17:41, , 4F
01/28 17:41, 4F
→
01/28 17:41, , 5F
01/28 17:41, 5F
→
01/28 17:43, , 6F
01/28 17:43, 6F
→
01/28 18:08, , 7F
01/28 18:08, 7F
→
01/28 19:09, , 8F
01/28 19:09, 8F
→
01/28 19:50, , 9F
01/28 19:50, 9F
→
01/28 21:31, , 10F
01/28 21:31, 10F
→
01/28 21:32, , 11F
01/28 21:32, 11F
→
01/28 21:32, , 12F
01/28 21:32, 12F
→
01/28 21:34, , 13F
01/28 21:34, 13F
→
01/28 21:34, , 14F
01/28 21:34, 14F