ebook img

You Can Program in C++: A Programmer's Introduction PDF

391 Pages·2006·4.131 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview You Can Program in C++: A Programmer's Introduction

Francis Glassborow You Can Program in C++ A Programmer’s Introduction You Can Program in C++ A Programmer’s Introduction Francis Glassborow You Can Program in C++ A Programmer’s Introduction Copyright2006 JohnWiley&SonsLtd,TheAtrium,SouthernGate,Chichester, WestSussexPO198SQ,England Telephone(+44)1243779777 Email(forordersandcustomerserviceenquiries):[email protected] VisitourHomePageonwww.wiley.com AllRightsReserved.Nopartofthispublicationmaybereproduced,storedinaretrievalsystemortransmittedinanyformorbyany means,electronic,mechanical,photocopying,recording,scanningorotherwise,exceptunderthetermsoftheCopyright,Designsand PatentsAct1988orunderthetermsofalicenceissuedbytheCopyrightLicensingAgencyLtd,90TottenhamCourtRoad,LondonW1T 4LP,UK,withoutthepermissioninwritingofthePublisher.RequeststothePublishershouldbeaddressedtothePermissions Department,JohnWiley&SonsLtd,TheAtrium,SouthernGate,Chichester,WestSussexPO198SQ,England,oremailedto [email protected],orfaxedto(+44)1243770620. Designationsusedbycompaniestodistinguishtheirproductsareoftenclaimedastrademarks.Allbrandnamesandproductnamesused inthisbookaretradenames,servicemarks,trademarksorregisteredtrademarksoftheirrespectiveowners.ThePublisherisnot associatedwithanyproductorvendormentionedinthisbook. Thispublicationisdesignedtoprovideaccurateandauthoritativeinformationinregardtothesubjectmattercovered.Itissoldonthe understandingthatthePublisherisnotengagedinrenderingprofessionalservices.Ifprofessionaladviceorotherexpertassistanceis required,theservicesofacompetentprofessionalshouldbesought. OtherWileyEditorialOffices JohnWiley&SonsInc.,111RiverStreet,Hoboken,NJ07030,USA Jossey-Bass,989MarketStreet,SanFrancisco,CA94103-1741,USA Wiley-VCHVerlagGmbH,Boschstr.12,D-69469Weinheim,Germany JohnWiley&SonsAustraliaLtd,42McDougallStreet,Milton,Queensland4064,Australia JohnWiley&Sons(Asia)PteLtd,2ClementiLoop#02-01,JinXingDistripark,Singapore129809 JohnWiley&SonsCanadaLtd,22WorcesterRoad,Etobicoke,Ontario,CanadaM9W1L1 Wileyalsopublishesitsbooksinavarietyofelectronicformats.Somecontentthatappears inprintmaynotbeavailableinelectronicbooks. LibraryofCongressCataloging-in-PublicationData Glassborow,Francis. YoucanprograminC++:aprogrammer’sintroduction/FrancisGlassborow. p.cm. Includesbibliographicalreferencesandindex. ISBN-13:978-0-470-01468-4(pbk.:alk.paper) ISBN-10:0-470-01468-7(pbk.:alk.paper) 1.C++(Computerprogramlanguage)I.Title. QA76.73.C153G592006 005.13(cid:1)3–dc22 2005026864 BritishLibraryCataloguinginPublicationData AcataloguerecordforthisbookisavailablefromtheBritishLibrary ISBN-13:978-0-470-01468-4(PB) ISBN-10:0-470-01468-7(PB) Typesetin10/11JoannaMTbyLaserwordsPrivateLimited,Chennai,India PrintedandboundinGreatBritainbyAntonyRoweLtd,Chippenham,Wiltshire Thisbookisprintedonacid-freepaperresponsiblymanufacturedfromsustainableforestry inwhichatleasttwotreesareplantedforeachoneusedforpaperproduction. Dedication This book is dedicated to the numerous people who have helped me to master the art of writing simple programsinC++.IappreciatetheirgentlecorrectionofprogrammingsothatithasreachedastandardthatI feelabletosharewithothers. Contents Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii StudyingC++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xviii UsingThisBook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix ACommentonComments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xx OverviewofC++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 WhatisinaName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 WhatisinC++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 DifferentBackgrounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 FundamentalC++forC++Programmers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 FundamentalC++forCProgrammers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 FundamentalC++forJavaProgrammers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 FundamentalC++forC#Programmers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 FundamentalC++forCOBOLProgrammers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 FundamentalC++forPythonProgrammers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 FundamentalC++for(Visual)BasicProgrammers . . . . . . . . . . . . . . . . . . . . . . . . . . 7 FundamentalC++forPascalandDelphiProgrammers . . . . . . . . . . . . . . . . . . . . . . . . 7 FundamentalC++forFunctionalProgrammers . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 FundamentalC++forLispandLogoProgrammers . . . . . . . . . . . . . . . . . . . . . . . . . . 8 FundamentalC++forObject-OrientedProgrammers . . . . . . . . . . . . . . . . . . . . . . . . . 9 FundamentalC++forEveryProgrammer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 1 GettingStarted. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Creatinga‘HelloWorld’Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 WhattheCodeMeans . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 OurSecondProgram–AnEmptyPlaypen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 WhattheCodeMeans . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.