VC++編譯錯誤信息

VC++編譯錯誤信息總結 

       0、 error C2180: controlling expression has type 'void'

        定義方式不應該爲void類型;

      1fatal error C1010: unexpected end of file while looking for precompiled header directive。 

  尋找預編譯頭文件路徑時遇到了不該遇到的文件尾。(一般是沒有#include "stdafx.h")

  2fatal error C1083: Cannot open include file: 'R…….h': No such file or directory

  不能打開包含文件“R…….h”:沒有這樣的文件或目錄。

  3error C2011: 'C……': 'class' type redefinition

  類“C……”重定義。

  4error C2018: unknown character '0xa3'

  不認識的字符'0xa3'(一般是漢字或中文標點符號)

  5error C2057: expected constant expression

  希望是常量表達式。(一般出現在switch語句的case分支中)

  6error C2065: 'IDD_MYDIALOG' : undeclared identifier

  “IDD_MYDIALOG”:未聲明過的標識符。

  7error C2082: redefinition of formal parameter 'bReset'

  函數參數“bReset”在函數體中重定義。

  8error C2143: syntax error: missing ':' before '{'

  句法錯誤:“{”前缺少“;”

  9error C2146: syntax error : missing ';' before identifier 'dc'

  句法錯誤:在“dc”前丟了“;”

  10error C2196: case value '69' already used

  值69已經用過。(一般出現在switch語句的case分支中)

       11error C2509: 'OnTimer' : member function not declared in 'CHelloView'

  成員函數“OnTimer”沒有在“CHelloView”中聲明。

  12error C2511: 'reset': overloaded member function 'void (int)' not found in 'B'

  重載的函數“void reset(int)”在類“B”中找不到。

  13error C2555: 'B::f1': overriding virtual function differs from 'A::f1' only by return type or calling convention

  類B對類A中同名函數f1的重載僅根據返回值或調用約定上的區別。

  14error C2660: 'SetTimer' : function does not take 2 parameters

  “SetTimer”函數不傳遞2個參數。

  15warning C4035: 'f……': no return value

  “f……”return語句沒有返回值。

  16warning C4553: '= =' : operator has no effect; did you intend '='?

  沒有效果的運算符“= =”;是否改爲“=”?

  17warning C4700: local variable 'bReset' used without having been initialized

  局部變量“bReset”沒有初始化就使用。

  18error C4716: 'CMyApp::InitInstance' : must return a value

  “CMyApp::InitInstance”函數必須返回一個值。

  19LINK : fatal error LNK1168: cannot open Debug/P1.exe for writing

  連接錯誤:不能打開P1.exe文件,以改寫內容。(一般是P1.Exe還在運行,未關閉)

  20error LNK2001: unresolved external symbol "public: virtual _ _thiscall C……::~C……(void)"

  連接時發現沒有實現的外部符號(變量、函數等)

  function call missing argument list 調用函數的時候沒有給參數。

  member function definition looks like a ctor, but name does not match enclosing class 成員函數聲明瞭但沒有使用unexpected end of file while looking for precompiled header directive在尋找預編譯頭文件時文件意外結束,編譯不正常終止可能造成這種情況 !

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章