1:ld returned 1 exit status
程式被滿寫(通常是在執行一個程式時再次執行時發生的),只要把程式關掉并把exe刪掉就可以了,
2:‘xxx’ was not declared in this scope
xxx變數、常量或函式并為定義,
3:‘long long long’ is too long for GCC
你嘗試定義一個long long long型別的變數,
4:#error xxx
你在程式中添加了預處理指令error,
5:multiple definition of xxx first defined here
xxx被多次定義了,
6:crosses initialization of ‘xxx’
在goto后面定義變數是不合法的(G++的bug還是feature?),
7:cannot convert ‘std::string {aka std::basic_string}’ to ‘const char*’ for argument ‘1’ to ‘xxx’
不能在xxx函式中的const char*引數呼叫string變數(C++的SB Feature),必須先轉成const char*,
8:expected ‘;’ after class definition
類的定義后面沒加分號
9:expected ‘;’ before ‘xxx’
在xxx函式后沒加分號,
10:invalid preprocessing directive #xxx
未知的預處理指令xxx(不包含#import),
11:如果全部函式都是not declare in this scope的話,有可能是沒有using namespace std;,
12:xxx: No such file or directory
沒有xxx這個檔案或目錄,
13:stray ‘\xxx’ in program
出現中文字符或其它非ascii碼字符,
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/249811.html
標籤:其他
上一篇:資料型別轉換的一些特殊規則
