資源描述:
《effective c++ more effective c++外語(yǔ)英文電子書(shū)》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在教育資源-天天文庫(kù)。
1、EffectiveC++byScottMeyersBacktoDedication??ContinuetoAcknowledgmentsPrefaceThisbookisadirectoutgrowthofmyexperiencesteachingC++toprofessionalprogrammers.I'vefoundthatmoststudents,afteraweekofintensiveinstruction,feelcomfortablewiththebasicconstructsofthelanguage,buttheyt
2、endtobelesssanguineabouttheirabilitytoputtheconstructstogetherinaneffectivemanner.Thusbeganmyattempttoformulateshort,specific,easy-to-rememberguidelinesforeffectivesoftwaredevelopmentinC++:asummaryofthethingsexperiencedC++programmersalmostalwaysdooralmostalwaysavoiddoing
3、.Iwasoriginallyinterestedinrulesthatcouldbeenforcedbysomekindoflint-likeprogram.Tothatend,IledresearchintothedevelopmentoftoolstoexamineC++sourcecodeforviolationsofuser-specifiedconditions.1Unfortunately,theresearchendedbeforeacompleteprototypecouldbedeveloped.Fortunatel
4、y,severalcommercialC++-checkingproductsarenowavailable.(You'llfindanoverviewofsuchproductsinthearticleonstaticanalysistoolsbymeandMartinKlaus.)Thoughmyinitialinterestwasinprogrammingrulesthatcouldbeautomaticallyenforced,Isoonrealizedthelimitationsofthatapproach.Themajori
5、tyofguidelinesusedbygoodC++programmersaretoodifficulttoformalizeorhavetoomanyimportantexceptionstobeblindlyenforcedbyaprogram.Iwasthusledtothenotionofsomethinglessprecisethanacomputerprogram,butstillmorefocusedandto-the-pointthanageneralC++textbook.Theresultyounowholdiny
6、ourhands:abookcontaining50specificsuggestionsonhowtoimproveyourC++programsanddesigns.Inthisbook,you'llfindadviceonwhatyoushoulddo,andwhy,andwhatyoushouldnotdo,andwhynot.Fundamentally,ofcourse,thewhysaremoreimportantthanthewhats,butit'salotmoreconvenienttorefertoalistofgu
7、idelinesthantomemorizeatextbookortwo.UnlikemostbooksonC++,mypresentationhereisnotorganizedaroundparticularlanguagefeatures.Thatis,Idon'ttalkaboutconstructorsinoneplace,aboutvirtualfunctionsinanother,aboutinheritanceinathird,etc.Instead,eachdiscussioninthebookistailoredto
8、theguidelineitaccompanies,andmycoverageofthevariousaspectsofaparticularlanguagefeaturemaybedispersedthr