C++primerErrata.docx
上传人:sy****28 上传时间:2024-09-13 格式:DOCX 页数:9 大小:24KB 金币:14 举报 版权申诉
预览加载中,请您耐心等待几秒...

C++primerErrata.docx

C++primerErrata.docx

预览

在线预览结束,喜欢就下载吧,查找使用更方便

14 金币

下载此文档

如果您无法下载资料,请参考说明:

1、部分资料下载需要金币,请确保您的账户上有足够的金币

2、已购买过的文档,再次下载不重复扣费

3、资料包下载后请先用软件解压,在使用对应软件打开

C++PrimerErrataLastmodified10June2008Everybookhasbugsinit,andC++Primerisnoexception.Thispagepresentsallthebugsthathavecometoourattention.AlloftheseerrorsarecorrectedintheNinthprinting,July2008.Manythankstothecarefulreaderswhonotifiedusoftheseproblems!TechnicalerrorscorrectedintheninthprintingPage221-222:Thetextshouldsaythatlikepreprocessordirectives,thenamesofpreprocessormacrosareuniquewithinaprogramandmaynotbeusedtodefineotherentities.Additionally,thetextshouldmentionthatpreprocessornamesaredefinedoutsideanynamespace.Inparticular,theassertmacroisnotdefinedinsidethestdnamespace.Wemaynotrefertostd::assert,andwemaynotprovideausingdeclarationforassert.Page290:Thecallcin.clear(old_state)inthefirstcodefragmentonthatpage,shouldbecin.setstate(old_state).Page313:ThedescriptionofthecompoundassignmentoperatorsinTable9.4incorrectlyrefertoiter2astheright-handoperand;ineachinstance,iter2shouldbereplacedbyn.Theright-handoperandmustbeanintegralvalue,notaniterator.Page442:Inthesecondcodefragment,thecalltodisplayshouldpasscoutasanargument.Pages617-618:TheconstructorsforclassesderivedfromQuery_basethattakeaQueryparametershouldbedefinedtotakeaconstreferencetoQuery.Pages837:InTableA.5thedescriptionofignoreisincorrect.Thetextinthattableshouldsay"Readsandignoresatmostsizecharactersuptoandincludingdelim."ClarificationsmadeintheninthprintingPage204:ThefirstsentenceinSection6.6.5wasundulyrestrictive:Asshownlaterinthatsection,wecandefinevariablesafteranycaselabel,solongaswedosoinsideablock.Page220:Attheverybeginningofthetextonthatpage,"define"shouldbe"createobjectsof"tomakeitclearthatwearereferringtocreatingobjectsofanexceptiontype.Page239:ThecommentinthedescriptionoftheforloopinsidetheprintValuesfunctionshouldindicatethatthearrayhas"atleast"10elements.Thischangemakesisclearerthatthearraymighthavemorethan10elements,butisinerroriftherearefewerthan10elements.Pages311-312:TheintroductiontoSection9.2andTable9.3shouldmakeitclearthattheoperationsbeingdiscussedapplytotheiteratorsassoc