c語言編譯中的常見錯誤_第1頁
c語言編譯中的常見錯誤_第2頁
c語言編譯中的常見錯誤_第3頁
已閱讀5頁,還剩3頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)

文檔簡介

1、1declarebutneverisassignedavaluewhichisnever?Codehasno ?Non-portableersibleuseof before1declarebutneverisassignedavaluewhichisnever?Codehasno ?Non-portableersibleuseof before? of一個程序文件中主函數(shù)main?Suspicious?UnreachableCompoundementmissinginfunction“”expected;“(”expectedCaseoutsideof不屬于Switchswitch?Case

2、ementmissing?Constant?Declarationsyntaxerror ?Defaultoutside?doementve?Extraparameterincall?Illegaluseofer ?Invalider?LvalueMisplaced? No? errequiredonleftside? ementmissing; ?Toorameters?Illegaluseofer ?Invalider?LvalueMisplaced? No? errequiredonleftside? ementmissing; ?Toorametersin?Unabletoopenin

3、cludefileUnexpected或:或UndefinedsymbolXinfunctionfun fun中的變量X主要錯誤類似于“undefinedsymbol?Abnormalprogram?Floatingerror或Divideby運(yùn)算結(jié)果不是一個數(shù)或被0 ?Null er?User 5GOtoCursorF4)oF7)到被調(diào)函數(shù)Step。Debug Result域中顯示變量或表達(dá)式的值。還可以用New value 到被調(diào)函數(shù)Step。Debug Result域中顯示變量或表達(dá)式的值。還可以用New value 域進(jìn)行調(diào)試。如果調(diào)試程序時發(fā)現(xiàn)Result AddWatchAddWa

4、tchcnotanargumentinfunctionsumarrayboundsmissinginfunctionmain 3.Array size too large in function main 數(shù)組規(guī)模太大4.badfilenameformatinincludedirective在包含指令中的文件名格式不正確5.Callofnon-functioninfunctionmaincannotmodifyaconstobjectinfunctionmain 對常量不能進(jìn)行修改characterconstanttoolonginfunctionmain8.constantrequiredi

5、nfuntionmain數(shù)組定義的時候,數(shù)poundmentmissinginfunctionmain 10.declarationsyntaxerrorinfunctionsyntaxinfunctionmain12.extraparameter數(shù)poundmentmissinginfunctionmain 10.declarationsyntaxerrorinfunctionsyntaxinfunctionmain12.extraparameter incalltosuminfunction13.illegaluseoffloatinginfunctionmain14.illegalpio

6、ntersubtractioninfunctionmain15.invalideradditioninfunctionmain16.outofmemoryinfunctionmainementmissinginfunctionmain語句后面漏掉分號1.kisassignedavaluewhichisneverused定義了一個變量,sibiysignmentinfunctionmain3.suspicious erinfunctionmain4.codehasnoeffectinfuntionmainAmbiguousoperatorsneedparentheses:Ambiguoussym

7、bolArgumentlistsyntaxerror:參數(shù)表語法錯誤 Array bounds missing :丟失數(shù)組界限符 Array size toolarge :數(shù)組尺寸太大BadcharacterinparamentersBadfilenameformatinincludedirective包含命令中文件名格式不正確 Bad ifdef directive synatax :ifdef有語法錯BadundefdirectivesyntaxundefBitfieldtoolargeCallofnon-functionCalltofunctionwithnoprototype調(diào)用函數(shù)時

8、沒有函數(shù)的說明 Cannot modify a const object :不允許修改常量對象CaseoutsideofswitchcaseCasesyntaxerrorCaseCodehasnoeffectCompoundementmissing分程序漏掉ingtypemodifiersConstantrequiredConstantoutofrangeincomparisonmayloseCasesyntaxerrorCaseCodehasnoeffectCompoundementmissing分程序漏掉ingtypemodifiersConstantrequiredConstantout

9、ofrangeincomparisonmaylosesignificantdigitsofnearernotallowedCouldnotfindfile Declaration missing ; :說明缺少; Declarationsyntaxerror說明中出現(xiàn)語法錯誤DefaultoutsideofswitchDefaultswitchDefinedirectiveneedsanidentifierbyzeroDo ementvewhileDo-whilewhileEnumsyntaxerrorEnumerationconstantsyntaxerrorErrordirectiveEr

10、rorwritingoutputfilesyntaxerrorExtraparameterincallFile longFunctioncallmissingFuctiondefinitionoutof placeFuctionshouldreturnavalueGotoementmissinglabel:GotoHexadecimaloroctalconstanttoolarge:168IllegalcharacterxIllegalinitialization: Illegal octal digit :IllegalersubtractionIllegalstructureoperati

11、onIllegal useoffloating:Illegal useof erImproperuseofatypedefsymbol類型定義符號使用不恰當(dāng) In-line assembly not allowed :不允許使用行間匯編patiblestorageIllegalersubtractionIllegalstructureoperationIllegal useoffloating:Illegal useof erImproperuseofatypedefsymbol類型定義符號使用不恰當(dāng) In-line assembly not allowed :不允許使用行間匯編patible

12、storageclasspatibletypeIncorrectnumberformatIncorrectuseofdefault Default使用不當(dāng)InvalidindirectionInvalid eradditionIrreducible Lvaluerequired00MacroargumentsyntaxerrorMacro toolongMismatchednumberofparametersindefinitionMisplacedbreakbreakMisplacedcontinuecontinueMisplaceddecimalMisplacedelifdirective

13、MisplacedelseMisplaced else directive else Misplacedendifdirectiveendif Must be addressable 必須是可以編址的Musttakeaddressofmemorylocation必NodeclarationforfunctionNostackNotypeinformationNon-portableerassignment不可移動的指針(地址常數(shù))Non-portablepo Non-portableNot avalid ercomparison不可移動的指針(地址常數(shù))erformattypelowedtyp

14、eNumericconstanttooNotypeinformationNon-portableerassignment不可移動的指針(地址常數(shù))Non-portablepo Non-portableNot avalid ercomparison不可移動的指針(地址常數(shù))erformattypelowedtypeNumericconstanttoolargeOutofmemoryParameterisneverusederrequiredonleftsideof符號-sibleuseof siblyRedeclarationofRedefinitionofbeforedefinitionsig

15、nmentisnotidenticalxxRegisterallocationfailureRepeatcountneedsanlvalueSizeofstructureorarraynotknownSementmissing語句后缺少StructureorunionsyntaxerrorXStructuresizetoolargeSubscriptingmissingSuperfluous&withfunctionorarray函數(shù)或數(shù)組中有多余的SuspiciouserSymbollimitexceededToo rametersincallToo many default cases D

16、efault太多(switch語句中一個) Toomanyerrororwarningmessages錯誤或警告信息太多ToomanytypeindeclarationToomuchautomemoryinfunctionToomuchglobaldatadefinedinfileTwoconsecutivedotsTypemismatchin數(shù)TypemismatchinredeclarationofxxUnabletocreateoutputfileUnabletoopenincludefile Unable to open input file UndefinedlabelUndefin

17、edstructureUndefinedsymbolUnexpectedTwoconsecutivedotsTypemismatchin數(shù)TypemismatchinredeclarationofxxUnabletocreateoutputfileUnabletoopenincludefile Unable to open input file UndefinedlabelUndefinedstructureUndefinedsymbolUnexpectedendoffileincommentstartedon從Unexpectedendoffileinconditionalstartedon從UnknownassembleinstructionUnknownopt

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論