2008-10-08 16:50:57
| 分類:
general|字型大小
訂閱 1.c++程式中出現 fatal error c1189: #error : eh.h is only for c++!
in creating dynamic dll vc++ 6.0:
added some .h and .c files to it.
i get:
fatal error c1189: #error : \"eh.h is only for c++!\"
#ifndef __cplusplus
#error \"eh.h is only for c++!\"
#endif
the cause :
include a c++ header file in a .c file.
for example: in a.c, you included
2.system : 具有該名稱的命名空間不存在
請問這個程式編譯為何報錯:
#include "stdafx.h"
using namespace system;
int _tmain(int argc, _tchar* argv)
錯誤是:error c2871: 「system」: 具有該名稱的命名空間不存在
error c2653: 「console」: 不是類或命名空間名稱
error c3861: 「writeline」: 找不到識別符號
原因:這些命名空間的宣告在.net的dll裡面,非clr模板建立的工程需要在專案屬性中手動新增引用。
project->win32project property pages->configuration properties->general
common language runtime support 填common language runtime support(/clr)
C C 遇到錯誤記錄
參考文章 解決方案 include 改為 includeusing namespace std includeusing namespace std void main void int min int x,int y int min if x解決方案 system pause 主函式中倒數第二行或...
記錄程式設計遇到的錯誤
1.error intptr t was not declared in this scope a adds include 未解決 b intptr t 等在io.h 中定義,在linux下本來就沒有,所以不可用。linux下 include 實現遍歷目錄。參考 2.error system wa...
程式設計遇到錯誤的排查方法
1.service註解錯誤 2.timeout要自行設定,預設時間不夠用 3.xml中配置properties路徑是否正確 有時候就是會錯一位目錄 4.大型專案時候,寫完程式沒有install介面 5.型別string integer double 寫錯,寫混,寫反 6.配置檔案中ref 和id 確...