編譯警告錯誤包括
A. 編程錯誤的時候一般怎麼找出錯誤,不是編譯錯誤是編程錯誤
其實你的問題總結一下就是如何檢查bug:
1、排查流程
2、總結
解決bug過程可能痛苦,累人,難受,壓力大,甚至暫時還解決不了,關鍵看是不是盡力了。要想自己得到提高,達到更高層次,這個坎必須跨過,否則只能是平庸的程序員,只能承擔一些簡單的任務。
解決bug的過程也能學到很多東西,也有很多樂趣,自己也能得到很大的提升,解決bug是屬於自己職責范圍內的事情,是種樂趣還是種包袱,關鍵看個人的心態。
最後,給大家分享一句很有名的話叫」峰高無坦途「,意思是:要想登上最高峰欣賞美景,沒有平坦的道路可走,都是懸崖峭壁,想登上高峰欣賞美景,必須跨過這些坎。
B. 在C程序中,編譯的時候,出現的那個warning,指的是什麼意思啊急,謝謝啦!
是警告信息,對於本編譯器規則來說,符合編譯規則,但是有些是無意義的,或者大了語法的擦邊球,不完全符合,但是也能用的。大部分可以忽略。有的時候可以設置警告的等級,視編譯器而定。
C. c++中什麼是語法錯誤,什麼是編譯錯誤
程序的錯誤主要分成三種:
編譯鏈接錯誤;
編譯鏈接錯誤又分成編譯錯和鏈接錯。
編譯錯就是普通意義上的語法錯,編譯器進行語法檢查不通過,也就是程序違背了計算機語言的語法,例如:括弧不匹配、變數名拼寫錯誤、用保留字定義變數名等;
鏈接錯是指程序通過了語法檢查,但是無法生成可執行文件,最常見的是鏈接找不到lib庫。初學者有時寫了函數的聲明,但是缺少函數的定義,此時就會出現鏈接錯。
運行錯誤;
運行錯是程序可以執行,但是在執行過程中發生異常,提前退出程序。最常見的是指針越界,打開文件失敗繼續讀取文件,總而言之是讓計算機執行一些不能執行的語句。
邏輯錯誤
邏輯錯是程序也能運行,就是結果不對,主要原因有:程序演算法本身錯誤,程序和演算法不同義等。
例如:新手經常將判斷相等的==寫成=賦值,往往就會導致邏輯錯。
你的BD(int,int); 是一句函數調用?還是一句函數聲明?
D. C語言編程時 都有什麼樣的錯誤提示
Ambiguous operators need parentheses
 不明確的運算,需要用括弧括起來
 Ambiguous symbol 'xxx'
 不明確的符號
 Argument list syntax error
 參數表語法錯誤
 Array bounds missing
 丟失數組界限符
 Array size too large
 數組尺寸太大
 Bad character in parameters
 參數中有不適當的字元
 Bad file name format in include directive
 包含命令中文件名格式不正確
 Bad ifdef directive syntax
 編譯預處理ifdef有語法錯誤
 Bad ifndef directive syntax
 編譯預處理ifndef有語法錯誤
 Bad undef directive syntax
 編譯預處理undef有語法錯誤
 Call of non-function    
 調用未定義的函數
 Call to function with no prototype    
 調用函數時沒有函數的說明
 Cannot modify a const object    
 不允許修改常量對象
 Case outside of switch    
 Case 出現在 switch 之外
 Case statement missing    
 漏掉了 Case 語句
 Case syntax error    
 Case 語法錯誤
 Case outside of switch    
 Case 出現在 switch 之外
 Case statement missing    
 漏掉了 Case 語句
 Case syntax error    
 Case 語法錯誤
 Code has no effect   
 代碼不可能執行到
 Compound statement missing } 
 復合語句漏掉了"}"
 Conflicting type modifiers
 不明確的類型說明符
 Constant expression required
 要求常量表達式
 Constant out of range in comparison
 在比較中常量超出范圍
 Conversion may lose significant digits
 轉換時會掉失有意義的數字
 Conversion of near pointer not allowed
 不允許轉換返指針
 Could not find file 'xxx'
 找不到xxx文件
 Declaration missing ;
 說明缺少分號";"
 Declaration syntax error 
 說明中出現語法錯誤
 Default outside of switch 
 default出現在switch語句之外
 Define directive needs an identifier
 定義編譯預處理需要標識符
 Division by zero
 用零作除數
 Do statement must have while
 do-while語句中缺少while部分
 Enum syntax error
 枚舉類型語法錯誤
 Enumeration constant syntax error
 枚舉常數語法錯誤
 Error directive: xxx
 錯誤的編譯預處理命令
 Error writing output file
 寫輸出文件錯誤
 Expression syntax error
 表達式語法錯誤
 Extra parameter in call
 調用時出現多餘錯誤
 File name too long
 文件名太長
 Function call missing )
 函數調用缺少右括弧
 Function definition out of place
 函數定義位置錯誤
 Function should return a value
 函數返回一個值
 Goto statement missing label
 goto 語句沒有標號
 Hexadecimal or octal constant too large
 16進制或8進制常數太大
 Illegal character 'x'
 非法字 x
 Illegal initialization
 非法的初始化
 Illegal octal digit
 非法的8進制數字
 Illegal pointer subtraction
 非法的指針相減
 Illegal structure operation
 非法的結構體操作
 Illegal use of pointer 
 指針使用非法
 Improper use of a typedef symbol
 類型符號定義使用不恰當
 In-line assembly not allowed
 不允許使用行間匯編
 Incompatible storage class
 存儲類別不相容
 Incompatible type conversion
 不相容的類型轉換
 Incorrect number format
 錯誤的數據格式
 Incorrect use of default
 default使用不正確
 Invalid indirection
 無效的間接運算
 Invalid pointer addition
 指針相加無效
 Irrecible expression tree
 無法執行的表達式運算
 Lvalur required
 需要邏輯值(0或非0值)
 Macro argument syntax error
 宏參數語法錯誤
 Macro expansion too long
 宏的擴展以後太長
 Mismatched number of parameters in definition
 定義中參數個數不匹配
 Misplaced break
 此處不應出現break語句
 Misplaced continue
 此處不應出現continue語句
 Misplaced decimal point
 此處不應出現小數點
 Misplaced elif directive
 此處不應出現編譯預處理elif
 Misplaced else
 此處不應出現else
 Misplaced else directive
 此處不應出現編譯預處理 else
 Misplaced endif directive
 此處不應出現編譯預處理 endif
 Must be addressable
 必須是可以編址的
 Must take address of memory location
 必須存儲定位的地址
 No declaration for function 'xxx'
 沒有函數 xxx 的說明
 No stack
 缺少堆棧
 No type information
 沒有類型信息
 Non-portable pointer assignment 
 不可移動的指針(地址常數)賦值
 Non-portable pointer comparison 
 不可移動的指針(地址常數)比較
 Non-portable pointer conversion 
 不可移動的指針(地址常數)轉換
 Not a valid expression format type 
 不合法的表達式格式
 Not an allowed type 
 不允許使用的類型
 Numeric constant too large 
 數值常數太大
 Out of memory 
 內存不夠用
 Parameter 'xxx' is never used 
 參數 xxx 沒有用到
 Pointer required on left side of ->
 -> 符號的左邊必須是指針
 Possible use of 'xxx' before definition
 在定義之前就使用了 xxx(警告)
 Possibly incorrect assignment
 賦值可能不正確
 Redefinition of 'xxx' is not identical
 xxx 的兩次定義不一致
 Register allocation failure
 寄存器定址失敗
 Repeat count needs an lvalue
 重復計數需要邏輯值
 Size of structure or array not known
 結構體或數組的大小不確定
 Statement missing ;
 語句後缺少";"
 Structure or union syntax error
 結構體或聯合體語法錯誤
 Structure size too large
 結構體的尺寸太大
 Subscripting missing ]
 下標缺少右方括弧
 Superfluous &with function or array
 函數或數組中有多餘的"&"
 Suspicious pointer conversion
 可疑的指針轉換
 Symbol limit exceeded
 符號超限
 Too few parameters in call
 函數調用時的實參少於函數的參數
 Too many error or warning messages
 錯誤或警告信息太多
 Too much auto memory in function
 函數中用到的局部存儲太多
 Too much global data defined in file
 文件中全局數據太多
 Too consecutive dots
 兩個連續的句點
 Type mismatch in parameter xxx
 參數xxx類型不匹配
 Type mismatch in redeclaration of 'xxx'
 xxx 重定義時的類型不匹配
 Unable to create output file 'xxx'
 無法建立輸出文件 xxx
 Unable to open include file 'xxx'
 無法打開被包容的文件 xxx
 Bit field too large
 位欄位太長
 Unable to open input file 'xxx'
 無法打開輸入文件 xxx
 Undefined label 'xxx'
 沒有定義的標號 xxx
 Undefined structure 'xxx'
 沒有定義的結構 xxx
 Undefined symbol 'xxx'
 沒有定義的符號 xxx
 Unexpected end of file in comment started on line xxx
 從 xxx 行開始的註解尚未結束,文件不能結束
 Unexpected end of file in conditional started on line xxx
 從 xxx 行開始的條件語句尚未結束,文件不能結束
 Unknown assembler instruction
 未知的匯編結構
 Unknown option
 未知的操作
 Unknown preprocessor directive: 'xxx'
 不認識的預處理命令 xxx
 Unreachable code
 無法到達的代碼
 Unterminated string or character constant
 字元串缺少引號
 User break
 用戶強行中斷了程序
 Void functions may not return a value
 void 類型的函數不應有返回值
 Wrong number off arguments
 調用函數時參數數目錯
 'xxx' not an argument
  xxx 不是參數
 'xxx' not part of structure
  xxx 不是結構體的一部分
 xxx statement missing (
 xxx 語句缺少左括弧
 xxx statement missing )
 xxx 語句缺少右括弧
 xxx statement missing ;
 xxx 語句缺少分號
 'xxx' declared but never used
 說明了 xxx ,但沒有使用
 'xxx' is assigned a value which is never used
 給 xxx 賦了值,但未用過
 Zero length structure
 結構體的長度為零
E. geany編譯時提示語法錯誤
語法錯誤:例如,第一關就根本不能夠通過的。內存泄露錯誤:語句中缺少標點等,這些錯誤導致在編譯時:這一類錯誤就屬於嚴重錯誤。雖然編譯器能夠讓你的源程序編譯通過,但是你的運行程序一旦執行,就會出現程序崩潰,無法實現你的程序功能等現象)那要根據你的具體源程序和具體的出錯信息(你的編譯出錯信息必須要寫出來)來進行判斷編譯錯誤到底是哪一類錯誤(因為編譯錯誤也分為多種。具體的有警告錯誤:即錯誤的嚴重性不是特別嚴重的。例如:沒有對某個變數賦初值
F. C++中邏輯錯誤、語法錯誤、編譯錯誤分別出現什麼情況
語法錯誤 就會導致 編譯錯誤
編譯錯誤和連接錯誤不能生成可執行程序
邏輯錯誤 沒辦法檢查,只能影響結果
