資源描述:
《More Effective C [EN]》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在學(xué)術(shù)論文-天天文庫(kù)。
1、MoreEffectiveC++,2E
2、ShiftingfromCtoC++Page1of267EffectiveC++EffectiveC++EffectiveC++byScottMeyersDedicationForClancy,myfavoriteenemywithin.ContinuetoAcknowledgementsBacktoDedication??ContinuetoIntroductionAcknowledgmentsAgreatnumberofpeoplehelpedbringthisbookintoexistence.Somecontri
3、butedideasfortechnicaltopics,somehelpedwiththeprocessofproducingthebook,andsomejustmadelifemorefunwhileIwasworkingonit.Whenthenumberofcontributorstoabookislarge,itisnotuncommontodispensewithindividualfile://C:DocumentsandSettingsxaiLocalSettingsTemp~hhB0EF.htm11/5/2009MoreEffec
4、tiveC++,2E
5、ShiftingfromCtoC++Page2of267acknowledgmentsinfavorofageneric"Contributorstothisbookaretoonumeroustomention."IprefertofollowtheexpansiveleadofJohnL.HennessyandDavidA.Pattersonin°°°ComputerArchitecture:AQuantitativeApproach(MorganKaufmann,1995).Inadditiontomotivatingthecomp
6、rehensiveacknowledgmentsthatfollow,theirbookprovidesharddataforthe90-10rule,whichIrefertoinItem16.TheItemsWiththeexceptionofdirectquotations,allthewordsinthisbookaremine.However,manyoftheideasIdiscusscamefromothers.Ihavedonemybesttokeeptrackofwhocontributedwhat,butIknowIhaveincluded
7、informationfromsourcesInowfailtorecall,foremostamongthemmanyposterstotheUsenetnewsgroups°°°comp.lang.c++and°°°comp.std.c++.ManyideasintheC++communityhavebeendevelopedindependentlybymanypeople.Inwhatfollows,InoteonlywhereIwasexposedtoparticularideas,notnecessarilywherethoseideasorigi
8、nated.BrianKernighansuggestedtheuseofmacrostoapproximatethesyntaxofthenewC++castingoperatorsIdescribeinItem2.InItem3,mywarningaboutdeletinganarrayofderivedclassobjectsthroughabaseclasspointerisbasedonmaterialinDanSaks'"Gotchas"talk,whichhe'sgivenatseveralconferencesandtradeshows.InI
9、tem5,theproxyclasstechniqueforpreventingunwantedapplicationofsingle-argumentconstructorsisbasedonmaterialinAndrewKoenig'scolumnintheJanuary1994°°°C++Report.JamesKanzemadeapostingto°°°comp.lang.c++onimplementingpostfixincrementanddecrementoperatorsviathecorrespondingprefixfunctions;I
10、usehistechniqueinIt