Discover millions of ebooks, audiobooks, and so much more with a free trial

Only $11.99/month after trial. Cancel anytime.

C# and C++: 5 BOOK IN 1: Comprehensive Coding Course - Mastering Both Languages from Beginner to Expert Level
C# and C++: 5 BOOK IN 1: Comprehensive Coding Course - Mastering Both Languages from Beginner to Expert Level
C# and C++: 5 BOOK IN 1: Comprehensive Coding Course - Mastering Both Languages from Beginner to Expert Level
Ebook1,118 pages9 hours

C# and C++: 5 BOOK IN 1: Comprehensive Coding Course - Mastering Both Languages from Beginner to Expert Level

Rating: 0 out of 5 stars

()

Read preview

About this ebook

? 5-in-1 Bundle = 1 Ultimate Guide ?

✅ Best Value for Your Money
✅ Master Two Powerful Languages
✅ Complete Comprehensive Guide

---

Are you eager to dive into the world of coding?
Do you crave a straightforward, step-by-step approach to programming?
Look no further than "C# & C++: 5 Books in 1 - The Ultimate Coding Course from Novice to Expert"!

This comprehensive guide is your ticket to mastering C# and C++ swiftly and efficiently. Whether you're a beginner or seasoned programmer, our user-friendly instructions will have you coding in no time.

1. Seamlessly progress from beginner to advanced levels with ease.
2. Theory meets practice—immediate application of concepts.
3. Say goodbye to dull manuals; embrace interactive learning.
4. Essential tools and strategies for beginners and experts alike.
5. Gain real-world application skills through practical exercises and examples.

Unlock the full potential of "C# & C++: 5 Books in 1 - The Ultimate Coding Course from Novice to Expert " and embark on a journey that covers:

**C# - Book 1**

Introduction to C# fundamentals
Data types, variables, and expressions
Class definition and implementation
Working with text files
And more...


**C# - Book 2**

- Advanced decision-making and control flow
- Functions and garbage collection
- Asynchronous programming
- And more...


**C# - Book 3**

- Advanced language features and class libraries
- Attribute-based programming
- Windows Presentation Foundation (WPF)
- ASP .NET and .NET CORE
- And more...


**C++ - Book 1**

- Setting up a C++ development environment
- Operations, loops, and decision-making
- Syntax, data types, and variables
- Custom function creation
- And more...


**C++ - Book 2**

- Basic concepts, classes, and objects
- Input and output streams
- Polymorphism
- And much more...


With this practical 5-in-1 guide, unleash your programming potential and enhance your coding prowess. Start coding your own programs efficiently and effectively today!

LanguageEnglish
PublisherRyan roffe
Release dateFeb 3, 2024
ISBN9798224767793
C# and C++: 5 BOOK IN 1: Comprehensive Coding Course - Mastering Both Languages from Beginner to Expert Level

Read more from Ryan Roffe

Related to C# and C++

Related ebooks

Programming For You

View More

Related articles

Reviews for C# and C++

Rating: 0 out of 5 stars
0 ratings

0 ratings0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    Book preview

    C# and C++ - Ryan roffe

    C++

    B b

    Theb bultimateb bbeginnersb bguideb btob blearnb bc++b bprogrammingb bstep-by-stepb b

    B b

    Introductionb b

    Thisb bbookb bisb bfitb bforb bbeginnersb bandb bforb bcodersb bwhob bareb binterestedb binb bgettingb bintob bbackendb bprogramming.b balthoughb bc++b bisb bsometimesb bportrayedb basb bab bspecterb bofb bdaysb bpast,b btheb blanguageb bisb bstillb bwithb busb bandb bitb bcontinuesb btob bbeb bbehindb bsomeb bofb btheb bbiggestb btechnologiesb bweb buseb btoday–notb bmentioningb bitsb bbigb bimprintb binb btheb bgamingb bworld.b bitsb bpowerb bandb bversatilityb bcontinueb btob bmakeb bitb boneb bofb btheb bmostb bimportantb blanguagesb bofb bourb btime.b bitb bisb bnotb bgoingb banywhereb bandb blearningb bitb bwillb bexpandb byourb bhorizons.b b

    C++b bisb boftenb butilizedb basb bab bbackendb blanguageb bforb bbigb bdatab bbecauseb bofb bitsb blittleb bprocessingb boverhead.b bcompaniesb blikeb bspotify,b badobe,b byoutube,b bandb bamazonb bpowerb btheirb bbackendb bwithb bc++,b bandb byoub bwillb bsoonb bseeb bwhy.b b

    C++b bisb balsob bbehindb bpowerfulb bgamingb bengines.b bgamingb benginesb ballowb bprogrammersb btob bbuildb bab bgameb bwithoutb bcodingb beverythingb bfromb bscratchb bandb btob beffectivelyb brenderb bcontent.b btheb bunityb bgameb bengineb bandb btheb bunrealb bengineb bareb bexamplesb bofb bgamingb benginesb bthatb brunb bonb bc++.b b

    C++b bisb bab bbeautiful,b befficientb blanguageb bbecauseb bofb btheb bfavorableb bpower/hardwareb bratio:b bitb busesb blittleb bhardwareb bforb btheb bamountb bofb bpowerb bitb bgivesb bus.b bthisb bisb bwhyb bthoseb bwhob blearnb bitb bloveb bit.b b

    Inb bthisb bbookb bweb bwillb bcoverb btheb bfollowingb btopics:b b

    Programmingbbterminologybbandbbprinciplesbbinbbprogrammingbb

    Settingbbupbbabbc++bbenvironmentbb

    Gettingbbstarted:bbsyntax,bbdatabbtypes,bbandbbvariablesbb

    Powerbbofbbc++:bboperations,bbloops,bbswitches,bbandbbdecisionbbmakingbb

    Creatingbbcustombbfunctionsbbinbbc++bb

    Youb bwillb balsob bfindb bab busefulb bglossaryb batb btheb bendb bsob bthatb byoub bcanb buseb btheb bbookb basb bab breferenceb bonceb byoub bgetb bcracking.b b

    B b

    B b

    B b

    Chapterb b1:b bsettingb bupb bab bc++b bdevelopmentb benvironmentb b

    Atb bitsb bmostb bbasic,b bprogrammingb bisb bwritingb bab blistb bofb binstructionsb binb bcodeb bthatb btheb bmachineb bcanb bunderstand.b btheb bcodeb bresidesb binb bexecutablesb bfiles.b btheseb bfilesb bcomeb bwithb bfileb bextensionsb bthatb btellb bab bcompilerb bwhatb blanguageb bisb binb btheb bfile.b btheseb bextensionsb bareb btheb bsuffixesb byoub boftenb bseeb batb btheb bendb bofb btheb bfile,b blikeb b.js.b b.cppb borb b.hpp.b b

    Tob bwriteb bcodeb bandb bsaveb bitb binb banb bexecutableb bfileb byoub bneedb btheb bfollowingb bthings:b b

    Abbtextbbeditor:bbthisbbwillbballowbbyoubbtobbwritebbandbbeditbbthebbcode.bb

    Abblanguagebbcompiler:bbthisbbprogrambbtakesbbthebbcodebbyoubbhavebbwrittenbbandbbtranslatesbbitbbintobbmachinebblanguagebbthatbbyourbbcomputerbbcanbbunderstandbbandbbfollow.bb

    Allb bprogrammingb blanguagesb bworkb blikeb bthisb bexceptb bhtml,b bcss,b bandb bjavascriptb b-b btheseb bprogramsb bareb binterpretedb bandb bexecutedb bbyb btheb bbrowserb b(introduction,b bn.d.).b bthisb bmeansb bbrowserb blanguagesb blikeb bjavascriptb bareb bsoftware-based,b bwhileb bc++b bisb bcompiledb bandb bthenb brunb bdirectlyb bonb byourb bmachine,b bnotb binb bab bsoftwareb benvironment.b b

    Thisb bmeansb bc++b bisb banb bassemblyb blanguage.b bassemblyb blanguagesb bareb blow-levelb bprogrammingb blanguagesb bthatb bneedb bab bcompilerb bsob btheyb bcanb brunb bonb bab bmachineb b(lithmee,b b2018).b binb bthisb bcontext,b btheb bwordb blow-levelb bdoesb bnotb bcarryb bab bbadb bconnotation;b bitb bisb bdescriptive,b bmeaningb bthatb btheb blanguageb bisb bcloserb btob btheb bmachineb borb bjustb bab bstepb bawayb bfromb bit.b b

    Asb byoub bcanb bprobablyb bguess,b bc++b bisb bab bgeneral-purposeb blanguageb bthatb bcanb brunb balmostb banywhere.b bthisb bmeansb bitb bcanb bbeb bassembledb bandb bcompiledb binb bseveralb bdifferentb bways.b bthisb bwillb blargelyb bdependb bonb byourb boperatingb bsystemb bandb btheb bcreationb butilitiesb byoub bareb busing.b b

    Ourb bc++b bexercisesb bwillb bbeb bcompiledb bonb banb bonlineb bide.b bideb bstandsb bforb bintegratedb bdevelopmentb benvironmentb bandb bitb bisb busedb btob beditb bandb bcompileb bcode.b bib bbetb bthatb bdescriptionb bsoundsb bfamiliar.b byes,b banb bideb bisb banb bexampleb bofb bab btextb beditor,b bbutb bunlikeb bab bplainb btextb beditor,b bitb bhasb bextrab bfeaturesb bthatb bareb bimportantb btob btheb bprogrammingb bprocess.b banb bideb bcanb bdob bthingsb blikeb bcompileb bcode,b bdebugb bcode,b bhighlightb bcode,b bwarnb byoub bofb bsyntaxb berrors,b bandb bmore.b b

    image44.png

    b b

    Geeksb bforb bgeeksb bide:b bab bweb-basedb bprogramb bcompilerb b

    Thisb bideb bcanb bbeb bfoundb batb bhttps://ide.geeksforgeeks.org/b bandb bhasb bseveralb bprogrammingb blanguages.b bweb bwillb bbeb bfocusingb bonb bc++.b bthisb bideb bhasb bmanyb bcodingb butilities:b bab btabbedb bworkingb bspace,b banb binputb bbox,b bandb bab bcodeb bmanager.b bthisb bcodeb bmanagerb bincludesb btheb btwob bbottomb bbuttonsb bhighlightedb bonb btheb bleft.b btheseb bcodeb bmanagerb bbuttonsb ballowb byoub btob bdownloadb bandb buploadb bcodeb basb bfilesb bwithb btheirb bcorrespondingb bfileb bextension.b bthisb bideb balsob ballowsb byoub btob brunb bandb bgenerateb bab burlb bthatb bsavesb btheb bresult.b bwe’llb bbeb busingb btheseb bgeneratedb burlsb btob bmanageb bourb blessons.b b

    Inb bthisb bbook,b bweb bwillb buseb bab bgeeksb bforb bgeeksb bweb-basedb bide,b bbutb byoub bshouldb blearnb btob bsetb bupb bab blocalb bide.b bforb btheb bmajorityb bofb byourb bprogrammingb bcareer,b bthatb bisb bwhereb byoub bwillb bbeb bworking.b bplus,b byoub bcanb bcustomizeb btheb bideb btob bfitb byourb bneedsb bandb bspruceb bupb byourb bcode.b b

    Settingb bupb byourb btextb beditorb b

    Ideb benvironmentsb bthatb bareb bfocusedb bonb bprogrammingb balwaysb bhaveb btob bhaveb bab btextb beditorb bandb bab bcompilerb bwithinb bthem.b bnon-ideb benvironmentsb bseparateb bcompilersb bandb bplainb btextb beditors.b btheb btextb beditorb bservesb basb bab bprogrammingb binterfaceb binb bnon-ideb bsetups;b bthisb bsimplyb bmeansb btheb btextb beditorb bwillb bbeb btheb bplaceb byoub btinkerb bwithb btheb bcode.b b

    Text Box 56

    b b

    Whenb blookingb bforb bab btextb beditor,b byoub bneedb boneb bwithb bsyntaxb bhighlightingb bandb bindentingb basb ballb bprogrammingb blanguagesb bfollowb btheirb bsyntax.b bthisb bisb bbecauseb byoub bwantb btob bbeb bableb btob breadb byourb bcodeb beasilyb bandb byoub bwantb bcollaboratorsb btob bbeb bableb btob bdob bso,b btoo.b btheseb btextb beditorsb bhelpb bbyb bimprovingb breadability.b bthisb bisb bespeciallyb bimportantb bbecauseb bcodingb bisb bnob blongerb bandb bhasb bneverb bbeenb bab bsolitaryb btask.b bthereb bisb bnob bone-manb bgeniusb blikeb binb btheb bmovies.b b

    Githubb bandb bpastebinb bareb bcodeb baggregatorsb bthatb bhaveb bsyntaxb bhighlightingb badd-onsb benabled.b bgithubb bwillb ballowb byoub btob bhostb byourb bentireb bprojectb bonb btheirb bsite,b bwhileb bpastebinb bonlyb ballowsb bcodeb bsnippets.b bonb btheseb bplatforms,b byoub bcanb bsaveb bcodeb binb bab bvarietyb bofb blanguages.b b

    Theyb bareb bveryb busefulb btob bprogrammersb bbecauseb btheyb ballowb bprogrammersb btob bshareb bcode,b bcollaborate,b btest,b bandb bsob bforth.b blearningb bhowb btob bdeployb bab bprojectb btob bgithubb bisb boneb bofb btheb bmostb bimportantb bthingsb binb bprogrammingb bbecauseb bitb bhasb bbecomeb bsob bstandardized.b bso,b bmaintainingb bab bgithubb bprofileb bhasb balsob bbecomeb bimportant,b basb bitb bholdsb ballb btheb bprojectsb byoub bareb bworkingb bon,b bhaveb bworkedb bon,b bandb byourb bactivityb b(peshev,b b2017).b btob bab bpotentialb bemployerb borb bcollaborator,b bthisb binformationb bisb binvaluable.b b

    image34.png

    b b

    C++b bcodeb bsyntaxb bexampleb b

    Thisb bisb bab bscreenshotb bfromb bpasteb bbinb bwithb bsyntaxb bhighlightingb benabledb b(c++b bcode,b b2015).b bsyntaxb bhighlightingb bandb btabbedb bspacingb bhelpb bwithb bmakingb btheb bcodeb bmoreb bcomprehensible.b ballb btextb beditorsb bwithb bsyntaxb bhighlightingb bwillb buseb bthisb bscheme:b blibrariesb binb bgreen,b bandb bfunctions,b bdatab btypes,b bandb bdatab binb bblue.b bstringsb bwillb bshowb bupb basb bred.b b

    Whenb byoub bareb bworkingb blocallyb byoub bwillb bnotb bhaveb bluxuriesb blikeb btheseb breadilyb bavailable.b btheb bfirstb btextb beditorb byoub bwillb bfindb bonb byourb bsystemb bifb byoub bareb busingb bwindowsb bisb bnotepad.b bwordpadb bisb banotherb boneb bthatb bhasb bmoreb bguib bfeatures.b bwhatb byoub bwillb bnoticeb basb byoub bopenb btheseb bprogramsb bisb bhowb bplainb bandb bboringb btheyb bare.b btheyb bareb blikeb bwordb bbutb bworse,b bbecauseb btheyb bshouldn’tb bbeb bsimpleb bwordb bprocessorsb bifb bwritingb befficient,b belegantb bcodeb bisb bimportantb btob bus.b btheirb bwordb bprocessor-likeb baspectsb bmakeb bthemb bmoreb bsuitableb bforb bwritingb bwordsb binb bthem,b bnotb bcode,b balthoughb byoub bcanb bcodeb binb bthem.b b

    image7.png

    b b

    Side-by-sideb bcomparisonb bofb bwindows’b bnotepadb butilityb bandb bwordpadb butilityb b

    Thisb bisb bab bscreenshotb bthatb bfeaturesb btwob bofb bwindows’b bbuilt-inb butilities,b bnotepadb bonb btheb bleftb bandb bwordpadb bonb btheb bright.b bwordpadb bhasb bmoreb bmicrosoftb bsuiteb bguib bfeaturesb bthatb bmayb bbeb bmoreb brecognizableb btob byou,b bincludingb bmicrosoft'sb bquickb baccessb bbarb blocatedb baboveb btheb bhighlightedb bfileb btab.b bnotepadb bisb bveryb bbare-bonesb binb bcomparison.b bbothb butilities,b bunlikeb bwordb bprocessors,b ballowb byoub btob bsaveb binb bdifferentb bfileb bextensions.b bhowever,b bwordpadb bisb bmoreb bsimilarb btob bab bwordb bprocessorb bthanb bnotepad,b bsavingb bfilesb binb brichb btextb bformatb b(.rtf).b bwordpadb bwillb bwarnb byoub bthatb byoub bwillb bloseb bformattingb bifb byoub bsaveb binb banb bextensionb botherb bthanb brichb btextb bformat.b b

    Whatb bmakesb bnotepadb bandb bwordpadb buniqueb bisb bthatb btheyb bcanb bsaveb bfilesb binb bab bvarietyb bofb bfileb bextensions,b bwhileb bwordb bprocessorsb bcannot.b bfileb bextensionsb bareb bimportantb bbecauseb btheyb btellb btheb bcompilerb bhowb btob binterpretb bwhatb bisb bwrittenb binb btheb bfile,b bandb bthatb bleadsb btob btheb bmachineb bhavingb bab bsetb bofb binstructionsb bitb bcanb bunderstandb bandb bexecute.b b

    Despiteb btheirb babilities,b btheseb btwob bprogramsb blackb bcrucialb btextb beditorb bfeaturesb blikeb bsyntaxb bhighlighting.b byoub bmightb bthinkb bthisb bisb bnob bbigb bdeal,b bbutb bitb bis;b btheb bsameb bwordsb binb bcodeb bcanb bmeanb bdifferentb bthingsb bbecauseb bofb bhowb bandb bwhenb btheyb bappear,b bsob bhighlightingb bhelpsb busb bdistinguishb bwhatb btheyb breferb bto.b bsob bifb beverythingb bisb bplain,b bblackb bandb bwhite,b byoub bhaveb btob bworkb bharderb btob bfigureb boutb bwhatb bab bpieceb bofb bcodeb brefersb bto.b bitb bsoundsb bcomplexb bnow,b bbutb bonceb byoub bcodeb bthisb bwillb bbecomeb bobviousb bandb bnecessary.b b

    Notepad++,b bnotb btob bbeb bconfusedb bwithb bwindows’b bnotepad,b bhasb bhighlightingb bfeaturesb bbutb byoub bwillb bhaveb btob bactivateb bthemb blikeb bso:b b

    image1.png

    b b

    Screenshotb bofb bnotepadb b++b bwithb bc++b bsyntaxb b

    Notepadb b++b bisb bfreeb band,b basb btheb bnameb bsuggests,b bwasb bprogrammedb binb bc++.b bthisb bscreenshotb billustratesb bhowb btob benableb blanguageb bsyntax.b bc++b bsyntaxb bcanb bspecificallyb bbeb benabledb bbyb bgoingb btob blanguageb b>cb b>b bandb bnavigatingb btob bc++.b bnotepad++b bisb bonlyb bavailableb bonb btheb bwindowsb bplatformb b(orin,b bn.d.).b b

    Bluefishb bisb bab bmoreb badvancedb btextb beditorb bthatb bcomesb bwithb bmoreb bfeaturesb b(bluefishb beditor:b bfeatures,b bn.d.).b bunlikeb bnotepad++,b bbluefishb bisb bavailableb bonb bmultipleb bplatformsb botherb bthanb bwindows.b bbutb bib bwouldb bnotb brecommendb bbluefishb bforb bbeginnersb bbecauseb bitb bhasb bab blotb bofb bfeaturesb bthatb bcanb bbeb boverwhelmingb btob bab bcompleteb bbeginner.b bifb byoub bareb bnotb bnewb btob bprogrammingb byoub bcanb bgob bgiveb bitb bab bshot;b byoub bwillb bfindb bitb bhasb bmanyb bofb btheb bguib bfeaturesb btypicalb bofb banb bideb btextb beditor.b b

    Onceb binb btheb btextb beditor,b byoub bmustb bselectb bab bcompiler.b bnowb bletb bmeb bshowb byoub bhowb byoub bwouldb bsetb bupb byourb blocalb benvironmentb bonb bthreeb bplatforms:b bwindows,b blinux,b bandb bmac.b b

    Windowsb bideb binstallationb bandb bsetupb b

    Allb byoub bneedb btob bdob bisb btob binstallb banb bide.b bjustb brememberb bthatb bitb bhasb btob bhaveb bab btextb beditorb bandb bab bcompilerb bwithinb bit.b bcode::blocksb bisb bab buseful,b bopen-sourceb bideb bmadeb bforb bc++b bandb bitb beasilyb bfitsb bwithb bab bvarietyb bofb bcompilersb bincludingb bmicrosoft'sb bvisualb bc++.b binstallingb bcode::blockb bisb beasy.b byoub bjustb bhaveb btob bgob btob btheirb bdownloadsb bpageb batb bhttp://www.codeblocks.org/downloads/26b bandb bselectb btheb blatestb bversion.b b

    image13.png

    b b

    Code::blocksb bdownloadb bpageb b

    Asb bofb bthisb bwriting,b bcode::blocksb bhasb bversionb b20.03b bforb bwindowsb bandb blinuxb bdistributions.b btheb bpageb balsob bincludesb bhelpfulb bnotesb bforb binstallation.b b

    Onceb btheb bprogramb bisb binstalled,b byoub bareb bset.b byoub bcanb buseb bitb btob bwriteb bc++b bprograms.b btob bdob bsob byoub bhaveb btob bfollowb bthreeb bsteps:b bcreatingb bab bfile,b bbuildingb btheb bprogram,b bandb brunningb btheb bprogram.b b

    Creatingb bab bnewb bfileb bisb bab bbitb bmoreb bnuanced.b bhereb bisb bwhatb byoub bhaveb btob bdo:b b

    Gobbtobbfilebb>bbnewbb

    Selectbbcreatebbanbbemptybbfilebbandbbinputbbyourbbcodebb

    Savebbthebbfilebbwithbbabb.cppbbextensionbb

    And,b bneedlessb btob bsay,b byoub bhaveb btob bbuildb bab bprogramb bbeforeb byoub bcanb brunb bit.b byoub bcanb bdob bthisb bbyb bgoingb btob bbuildb b>b bbuildb bandb brunb binb btheb bmenu.b b

    image20.png

    b b

    Screenshotb bofb bhellob bworldb binb bcode::blocksb b

    Thisb bisb bab bliveb bscreenshotb bofb bourb bhellob bworldb bprogramb binb bcodeb bblocks.b bafterb bthisb bprogramb bisb brun,b banb berrorb bshowsb bupb binb btheb bbuildb bmessagesb bofb btheb bcode.b bcode::blocksb bhighlightsb btheb berrorb bonb blineb b6.b bgivenb byourb bknowledgeb bofb bc++b bsyntaxb bfromb btheb bearlierb bsection,b byoub bshouldb bseeb bhowb btob brepairb btheb bcode.b bhowb bcanb bweb brepairb btheb bcode?b b

    Hint:b bdatab bandb bfunctionsb bareb bsupposedb btob bshowb bupb binb bblue.b b

    Byb btheb bway,b bthisb bprogramb bisb bveryb blightweightb bforb btheb bamountb bofb bworkb bitb ballowsb byoub btob bdo.b bcode::blockb bisb bavailableb bonb bwindowsb bandb blinux,b bbutb bthereb bisb bnob bmacb bversion.b b

    Macb bosb bideb binstallationb bandb bsetupb b

    Forb bmac,b byoub bwillb bneedb btob bgetb bxcode.b bitb bisb bab bfreeb bideb bsoftwareb bdevelopmentb bsuiteb bforb bmacos.b byoub bcanb bgetb bitb bonb btheb bmacb bappb bstore.b bxcodeb bsupportsb bab bvarietyb bofb botherb blanguagesb blikeb bjava,b bpython,b bandb bruby.b b

    Itb bisb bgearedb btowardb bdevelopingb bsoftwareb bforb bmacosb boperatingb bsystems;b bthisb bcanb bbeb bforb btheb btvosb bforb bappletv,b bwatchosb bforb bappleb bwatches,b bandb btheb bipadosb bforb bipadb btabletsb b(what’sb bnewb binb bxcodeb b9,b bn.d.).b bxcodeb boffersb bab bvarietyb bofb bsoftwareb bdevelopmentb bkitsb b(sdks)b bforb bdifferentb bmacosb bplatformsb btob bhelpb bprogrammersb bthroughb bapple’sb bproprietaryb bprogrammingb bschemes.b bsdksb bareb bab bsetb bofb btools,b bprovidedb bbyb bhardwareb bandb bsoftwareb bvendors,b busedb bforb bdevelopingb bapplicationsb bforb bspecificb bplatformsb b(what’sb bnewb binb bxcodeb b9,b bn.d.).b bsdksb ballowb bdevelopersb btob bbeb bfullyb bintegratedb bwithinb bab bdevelopmentb bcommunity,b blikeb bapple’sb borb bandroid’s.b b

    Macb busesb bproprietaryb bcompilersb bthatb bwillb bonlyb bworkb bwithb bxcode,b bsob bifb byoub bareb bonb bmacb byoub bhaveb blittleb bchoiceb bbutb btob bdevelopb bwithb bc++b busingb bxcode.b byoub bcanb bdownloadb bandb binstallb bxcodeb bbyb bfollowingb bthisb blink:b b

    https://apps.apple.com/us/app/xcode/id497799835?mt=12b b

    Onceb btheb bfileb bisb bdownloadedb bandb binstalled,b bopenb bxcodeb bandb bclickb bonb btheb bcreateb bab bnewb bxcodeb bprojectb bicon.b bthenb bselectb bnewb bprojectb binb btheb binitialb bwindow.b b

    image12.png

    b b

    Initialb bscreenb bforb bxcode:b bselectb bab bnewb bprojectb b

    Theseb bscreenshotsb bfeatureb banb bxcodeb bbuildb bfromb bversionb b8.3.3b b(patel,b b2017).b btherefore,b bourb bexamplesb bmightb blookb bdifferentb bfromb bab bmoreb bup-to-dateb bbuild.b basb bofb bthisb bwriting,b btheb bmostb bcurrentb bversionb bisb b12.1,b bwhichb bmostlyb bincludesb bupdatesb btob btheb bvariousb bmacosb bplatformb bsdksb b(‎xcode,b bn.d.).b bdespiteb btheseb bdifferences,b btheseb bscreenshotsb bwillb bstillb bhelpb byoub borientb byourselfb binb btheb bmoreb bcurrentb bbuild.b bourb binstructionb bwillb bstillb byieldb bresults.b b

    Afterb byoub bdob bthis,b bab bpromptb bwindowb bwillb bappearb bthatb bwillb baskb byoub btob bchooseb bab btemplate.b bthisb bwindowb bwillb bguideb byoub bthroughb btheb brestb bofb btheb bsetup.b bselectb btheb bmacosb bsectionsb bandb bgob btob btheb bapplicationb bsection;b binb bthere,b bchooseb btheb bcommandb blineb btool.b b

    Itb blooksb bsomethingb blikeb bthis:b b

    image6.png

    b b

    1.b bprojectb bselectionb bscreen:b bmacosb b>b bapplicationb b>b bcommandb blineb btoolb b

    Xcodeb bhasb bmanyb bbuilt-inb bcodeb butilitiesb bforb brunningb bprogramsb bonb bvariousb bappleb bplatforms.b btherefore,b btob brunb bab btestb bprogramb byoub bwouldb bhaveb btob bselectb bmacosb bforb bitb btob brunb bonb byourb bprogram.b bfurther,b btob baccessb bassemblyb blanguageb bsoftwareb bdevelopmentb bneededb bforb bc++,b byoub bwouldb bhaveb btob buseb bxcode’sb bcommand-lineb btool.b bthisb bcommand-lineb btoolb bcanb bhandleb bobjective-cb bandb bcb blanguagesb basb bwell.b b

    Afterb byoub bselectb bab btemplate,b btheb bguideb bwillb bpresentb boptionsb bforb btheb bcommand-lineb btool.b bhere,b byoub bcanb bnameb btheb bproject,b baddb byourb borganization’sb bname,b buseb bab bbundleb bidentifier,b bandb bselectb bab bprogrammingb blanguage.b b

    image49.png

    b b

    2.b bcommandb blineb btoolb boptions:b blanguageb b>b bselectb bc++b b

    Xcode’sb bcommand-lineb btoolb bcanb bhandleb bmicrosoft’sb bproprietaryb blanguagesb blikeb bswift.b bthisb bprogramb bcanb brunb balongsideb bc-basedb blanguagesb binb bmacb bcompilers,b bincludingb bc++.b bswiftb bisb bselectedb bbyb bdefault.b b

    Inb btheb bsameb bwindow,b byoub bwillb bbeb brequiredb btob baddb banb borganizationb bidentifier.b brememberb bthatb bxcode’sb bcommand-lineb btoolb bisb bab bprogrammingb btemplateb bforb bproprietaryb bmacosb boperatingb bsystems,b bsob btheb borganizationb bidentifierb bisb busedb btob bcreateb bab buniqueb bideab bforb byourb bprogramb binb bappleb bdatabases:b btheb bappleb bdeveloperb bwebsiteb bandb bicloudb bcontainer,b bitunesb bconnectb bportalb binb btheb bappstore.b bthisb bwillb bstreamlineb byourb bappb bintob bab bproprietaryb bmacosb bframework.b b

    image11.png

    b b

    3.b bcommandb blineb btoolb boptions:b borganizationb bidentifierb b>b bcppb b

    Theb borganization'sb bidentifierb bisb bab bnamingb bconventionb bthatb bhelpsb bprogrammersb bintegrateb btheirb bprojectsb bintob bapple’sb bproprietaryb bsoftwareb bdevelopmentb bscheme.b bhere,b bweb bareb busingb bcppb basb bourb bidentifier,b bwhichb bgeneratesb bcpp.helloworldb basb bourb bbundleb bidentifier.b bonceb bweb bindicateb banb bidentifier,b btheb bguideb ballowsb busb btob bproceedb btob btheb bnextb bstep.b b

    Now,b bsaveb byourb bprojectb binb bab bdirectoryb bofb byourb bchoice.b bonb btheb bleft-handb bsideb bpane,b bxcodeb bwillb bbeb bableb btob bopenb btheb bfile.b byoub bwillb bhaveb btob bselectb bmain.cppb btob baccessb btheb bglobalb bc++b bfileb bforb byourb bprogramb binb bxcode.b bifb byoub bsob bdesire,b byoub bcanb buploadb bcppb bfilesb bintob btheb bdirectory,b bandb beditb bthem.b b

    image40.png

    b b

    3.b bxcodeb bcommandb blineb btool:b bmain.cppb b

    Thisb bscreenshotb bfeaturesb btheb bideb bstyleb bxcodeb bcommandb blineb btoolb bworkspace.b bitb bhasb btheb b 00013.jpeg b bopenedb binb btheb btextb beditorb b(patel,b b2017).b b

    Onceb byoub bhaveb bwrittenb bsomeb bcodeb bandb byoub bwantb btob brunb bit,b byoub bselectb bproductb bandb bclickb bonb brun.b balso,b byoub bcanb brunb bandb bbuildb btheb bprogramb bbyb bselectingb btheb bbutton.b b

    image36.png

    b b

    4.b bxcodeb bcommandb blineb btool:b bhellob bworldb bbuildb bandb brunb b

    Similarb btob btheb bcode::blocksb bide,b byoub bwillb balsob bhaveb btob bbuildb bandb bthenb brunb byourb bprogram.b bthisb bscreenshotb balsob bfeaturesb btheb bresultsb bofb bhellob bworldb bandb btheb breturnb bvalueb b(patel,b b2017).b b

    Ifb byoub bareb bab bprogrammerb bwhob bseesb bthemselvesb bworkingb bwithb bappleb bdevices,b bworkingb bandb bpracticingb binb bxcodeb bisb bab bgoodb binvestment.b bforb binstance,b bappleb bhasb bab bhealthyb bshareb bofb btheb bmarketb binb bab bwideb bvarietyb bofb bconsumerb bgoodsb bandb bservicesb blikeb bstreamingb bservicesb bandb bdevices.b bwithb bthatb bsaid,b byoub bshouldb bkeepb binb bmindb bthatb bc++b bisb busedb bmostlyb basb bab bserver-sideb blanguage.b bserver-sideb bprogrammingb bisb bcodeb bthatb bcontrolsb bhowb bcontentb bisb bdeliveredb btob bab bdynamicb bwebsiteb blikeb byoutube.b bmostb bserver-sideb bprogrammingb bisb bdoneb bonb blinuxb bmachines.b b

    Linuxb bcompilerb binstallationb b

    Linuxb bisb bab bconsole-basedb boperationb bsystem,b bsob bitb bdoesb bnotb bneedb bab btextb beditor.b binstead,b bweb bwillb bfocusb bonb binstallingb bandb bsettingb bupb bab bprogrammingb bcompiler.b bmacb bandb bwindowsb bautomaticallyb binitializeb bab bcompilerb bwithinb btheb bide,b bbutb binb blinux,b bab bmoreb bhands-onb bapproachb bisb brequired.b byoub bwillb bbeb brequiredb btob bexecuteb bab bbackendb binitialization.b bitb bmightb bseemb blikeb bab blotb bofb bwork,b bbutb binb btheb bgreatb bschemeb bofb bthings,b bitb ballowsb bthoseb bworkingb bwithb blinuxb btob bhaveb bfullb bcontrolb bofb btheb bdevelopmentb bprocedureb bandb bunlockb bmoreb bcomputingb bpower.b b

    Becauseb blinuxb bisb banb boperatingb bsystemb bthatb busesb bab bconsoleb binterface,b bitb bwillb bbeb bstrangeb btob bbeginnersb borb banyoneb bwhob bisb busedb btob bwindowsb borb bmac.b bthisb bisb bbecauseb busersb bareb boftenb busedb btob bab bgui.b btheb bgui-lessnessb bofb blinuxb ballowsb bmoreb bcomputingb bpowerb btob bbeb bfreedb bforb bprogrammingb b–b bab bguib btakesb bsomeb bcomputingb bpowerb btob bproduceb bandb bmaintain.b bthisb bisb bwhyb bmanyb bserversb bandb botherb bprogrammingb benvironmentsb bhaveb bconsoleb binterfaces.b balso,b bmanyb bofb bthemb buseb blinuxb bdistributions.b b

    Ab blinuxb bdistributionb b(distro)b bisb banb boperatingb bsystemb bmadeb bfromb blinuxb bkernel-basedb bsoftwareb bcollectionb bandb bpackageb bmanagementb bsystemb bforb binstallingb badditionalb bsoftware.b b

    Theb bfollowingb bareb binstructionsb bforb binstallingb bandb binitializingb bab bcompiler.b bthisb bwillb bbeb bforb bubuntu,b bab bpopularb blinuxb bdistrob bforb bbeginners.b btheseb binstallationsb bwillb bbeb bsimilarb binb banyb blinuxb bdistrob byoub bwillb bbeb busing.b b

    Note:b bthereb bareb bmanyb bdistributionsb bofb blinuxb bthatb bprovideb bab bguib bbasedb bdesktopb bexperienceb bthatb bmanyb busersb blove.b bmostb bofb btheseb bareb bopen-sourceb bandb bfreeb btob bdownloadb bandb binstall.b byoub bcanb bexploreb btheseb bdistrosb bandb bcreateb bconsoleb binterfacesb btob bpracticeb bon.b boneb bfreeb bdistrob btob bconsiderb bisb bcentos,b bwhichb bisb bbasedb bonb bredb bhatb bforb bserverb bmanagementb b(centos-faqb b|b bopenb bsourceb bcommunity,b bn.d.).b bredb bhatb benterpriseb blinuxb b(rhel)b bisb busedb binb bmanyb bserverb bmanagementb bsetupsb bandb bisb bnotb bfree.b bhowever,b bcentosb busesb bmanyb bofb bitsb bcomponentsb bandb bisb banb bexcellentb bdistrob bforb bpreparingb btob bworkb binb bredb bhatb benvironments.b b

    Inb bthisb bexample,b bweb bwillb buseb btheb bgnub bcollectionb bcompilerb bonb blinux.b btheb bgnub bcollectionb bcompilerb bisb bab blinux-basedb bcompilerb bthatb bsupportsb bc++b bandb botherb bvariousb blanguagesb blikeb bfortran,b bada,b bandb bjavab b(gccb b7b breleaseb bseries—changes,b bnewb bfeatures,b bandb bfixes—gnub bproject—freeb bsoftwareb bfoundationb b(fsf),b bn.d.).b btob binstallb bgnub bgcc,b bfollowb btheseb bsteps:b b

    Inbbthebbconsole,bbenterbbthebbfollowingbbcommands:bb

    Checkb bfirstb bifb bthereb bisb bab bversionb balreadyb binstalledb bonb byourb bmachineb bbyb benteringb bthisb bcommand:b bgccb b–vb b

    image45.png

    b b

    Checkbbforbbgnubbgccbbinbbubuntubbconsolebb

    Youb bshouldb bcheckb byourb bsystemb bforb bab bcopyb bofb btheb bgcc.b bthisb bscreenshotb bfeaturesb bab bsystemb bwithb bgccb balreadyb binstalledb b(patel,b b2014).b bafterb busingb btheb bcommand,b bifb bthereb bisb bnob bcopyb bofb bgccb binb byourb bsystem,b bitb bwillb bbeb bmissingb bthisb bline.b bifb bthereb bisb bab bcopy,b bitb bwillb bhaveb bab bsimilarb bline.b bmostb blikely,b byourb bversionb bwillb bbeb bmoreb brecent.b b

    Theb bfollowingb bcommandsb bwillb binstallb bgccb bonb byourb bsystemb b(agarwal,b b2017b):b b

    Sudob bapt-getb bupdateb b

    Sudob bapt-getb binstallb bgccb b

    image19.png

    b b

    Installbbgnubbgccbbinbbubuntubbconsolebb

    Inb btheb bscreenshot,b bab bgncb bgccb bisb balreadyb bpresent.b brunningb btheb bhighlightedb bcommandb bwillb binstallb btheb bgnub bgccb bonb byourb bsystemb bifb bitb bisn’tb bthereb b(patel,b b2014).b btheb bconsoleb bwillb bpromptb byoub btob btypeb byb bforb bitb btob bbeginb btheb binstallation.b byoub balsob bareb bofferedb bpackageb bmanagementb bfeaturesb blikeb btheb babilityb bofb btheb bterminalb btob binformb byoub bofb boutdatedb borb bunnecessaryb bpackages.b bitb bwillb balsob bsuggestb bcommandsb bthatb bwillb bmakeb byourb bsystemb bmoreb befficient.b bthisb bexplainsb btheb bpopularityb bofb blinuxb bwithb bprogrammers;b balthoughb bwordy,b bitb ballowsb bthemb btob btroubleshootb bwithb bease,b bgivesb bthemb bmoreb bcontrol,b bandb bitb bisb beasyb btob bnavigateb bwhenb bcomparedb btob bguis.b bthisb bisb bbecauseb bprogrammersb bareb bmoreb blikelyb btob brememberb bab blineb bofb bcodeb bthanb bwhereb bsomethingb bresidesb binb btheb bgui.b b

    Theb bfollowingb bcommandb bwillb binstallb ballb btheb blibrariesb brequiredb btob bcompileb bcodeb bandb beventuallyb brunb bc++:b b

    Sudob bapt-getb binstallb bbuild-essentialb b

    image39.png

    b b

    Installbbgnubbgccbbinbbubuntubbconsolebb

    Thisb bscreenshotb bshowsb bab bsystemb bwithb btheb bbuild-essentialb blibrariesb binstalledb bandb binputtingb btheb bhighlightedb binstallationb bcommandb b(patel,b b2014).b bjustb basb bwithb binstallingb btheb bgcc,b bafterb busingb btheb bcommandb bandb bfindingb bthereb bisb bnob bcopyb bofb btheb bbuild-essentialb blibrariesb binb byourb bsystem,b bitb bwillb bpromptb byoub btob binstall.b btypeb binb byb bandb btheb bterminalb bwillb binstallb blibraries.b b

    Checkbbthebbinstallationbbwithbbthebbfollowingbbcommand:bb

    G++b b--versionb b

    Ifb ballb bwentb bwellb bitb bwillb btellb byoub bwhatb bversionb bofb bgccb bisb binstalled.b b

    Becauseb blinuxb bhasb bab bbuilt-inb btextb beditorb byoub bwillb bhaveb btob buseb btheb bfollowingb bcommandb btob baccessb btheb bguib bforb btheb btextb beditor:b b

    Geditb b

    Youb bwillb bbeb bfreeb btob bwriteb byourb bprogramb basb byoub bseeb bfit.b brememberb btob bsaveb btheb bprogramsb bwithb btheb b.cppb bextensionb bsob bthatb btheyb bwillb bbeb bcompiledb bcorrectly.b b

    image52.png

    b b

    Geditb binb bubuntub b

    Thisb bscreenshotb bfeaturesb blinux’sb bbuilt-inb btext-editor,b bgeditb b([runningb bc,b bc++b bprogramsb binb blinux]b bubuntub b16.04b b(ubuntub btutorialb bforb bbeginners),b bn.d.).b bgeditb bisb bab blinuxb bprogrammingb btextb beditorb butilityb bthatb bhasb bsyntaxb bhighlightingb bandb btabbedb bspacingb bfeaturesb bforb bab bdiverseb barrayb bofb bprogrammingb blanguages.b bbeb bsureb btob bhaveb bc++b bselectedb bfromb btheb bhighlightedb bdropdownb bmenu.b byoub bcanb bsaveb byourb bprogramb bfileb binb btheb bguib bbyb bclickingb btheb bsaveb bbutton.b bbeb bsureb btob blistb bwhichb bdirectoryb byoub bhaveb byourb bfileb bsaved,b basb byoub bwillb bhaveb btob bpointb btheb bcompilerb btob bthatb bdirectoryb btob bcompileb bandb brunb btheb bcode.b b

    Tob btestb bandb brunb byourb bcodeb byoub bmustb bfollowb btheseb binstructions:b b

    Leadbbthebbterminalbbtobbthebbfilesbbdirectorybb

    Tob bdob bthisb buseb bthisb bcommand.b benterb bitb binb btheb bdirectoryb brepeatedlyb buntilb btheb b.cppb bfileb bisb brevealed.b b

    Lsb b

    Compilebbandbbtestbbthebbprogrambbfilebb

    Useb btheseb bcommandsb btob bdob bso:b b

    00019.jpeg

    b b

    Ifb bthereb bareb banyb berrorsb bthisb bcommandb bwillb btellb byoub bwhichb blineb bcontainsb btheb berrorb bjustb blikeb byoub bwouldb bexpectb bfromb banb bide.b bthenb byoub bcanb bopenb btheb bprogramb bfileb bthroughb bgeditb b[filename.cpp]b bandb bfixb btheb blineb bofb bcode.b b

    Runbbthebbprogrambbfilebb

    Theb bcompilerb bwillb bcreateb banb bexecutableb bfileb bcalledb btestb bthatb bwillb brunb btheb bprogram.b byoub bcanb bexecuteb bitb bbyb benteringb b.b b/testb binb btheb bterminal.b b

    image32.png

    b b

    Testing,b bcompilingb bandb brunningb bab b.cppb bfileb binb bubuntub b

    Thisb bscreenshotb bfeaturesb btheb bterminalb btesting,b bcompiling,b bandb brunningb btheb bexampleb bcodeb bwrittenb binb bgeditb b([runningb bc,b bc++b bprogramsb binb blinux]b bubuntub b16.04b b(ubuntub btutorialb bforb bbeginners),b bn.d.).b b

    Linuxb bdistrosb bareb bverboseb bconsole-basedb bsystemsb bandb bmostb bofb bthemb bcanb bhandleb bprogrammingb binb banyb blanguageb bthroughb btheb bterminal.b blearningb btob bworkb binb btheb blinuxb benvironmentb bisb bbeneficialb basb bitb bexposesb byoub btob bserver-sideb bprogramming.b b

    Note:b btheb bprocessb bforb binstallingb bgccb bandb bcompilingb bonb bcentosb bisb bsimilar.b btob binstall,b byoub binsteadb buseb b"

    00021.jpeg

    .b bthisb bcommandb bautomaticallyb binstallsb btheb bneededb blibrariesb basb bwell.b btheb bstepsb bforb bcomposing,b bcompiling,b btesting,b bandb brunningb btheb bprogramb bareb ballb btheb bsame.b b

    Creatingb byourb bownb bprogrammingb benvironmentb bhelpsb bprepareb byoub bforb breal-worldb bscenariosb binb bab bwayb bthatb bonlineb bcodingb bspacesb bcannot.b binb bthisb bbook,b bweb bwillb bbeb busingb banb bonlineb bide.b bthisb bisb bbecauseb beveryoneb bwillb bhaveb btheb bsameb blearningb benvironmentb bwithb bstandardizedb boutputsb bandb binterfaces.b bitb bsimplifiesb bthings.b b

    B b

    B b

    B b

    Chapterb b2:b bbasicsb bofb bc++,b bprinciplesb bofb bprogrammingb b

    Programmingb blanguagesb bareb blikeb banyb botherb bhumanb blanguage:b btheyb bhaveb bstructure,b bsyntax,b bandb brules.b bitb bisb bnotb benoughb btob bknowb btheb bwordsb bofb banotherb bhumanb blanguage.b bknowingb bhowb btob buseb bthemb bandb bhowb btheyb bfunctionb binb bthatb blanguageb bisb banb bintegralb bpartb bofb bcommunicatingb beffectivelyb binb bthatb blanguage.b bprogrammingb blanguagesb bfunctionb btheb bsameb bway,b bbutb btheb bcommunicationb btheyb bcareb baboutb btryingb btob bhelpb bisb boneb bbetweenb bmanb bandb bmachine.b bwhileb bmachines,b batb bleastb btoday,b bcanb bneverb bbeb basb bcleverb bandb bcapableb basb bweb bare,b bthereb bisb bab blotb btheyb bcanb bunderstandb batb bab brateb bandb bwithb banb befficacyb bthatb bisb balienb btob bus.b ballb bprogrammingb bisb bab bsetb bofb binstructions.b btheseb binstructionsb bcanb bbeb brules,b btheyb bcanb bbeb bactionsb byoub bwantb btheb bmachineb btob bperform,b borb bsomethingb belse.b bbutb ballb bthisb bcommunicationb bisb bpossibleb bbecauseb bweb bfollowb btheb brulesb bofb bab bprogrammingb blanguage.b b

    Programmingb brules,b borb bsyntax,b bareb bab blistb bofb bdelineatingb bsymbolsb busedb btob bcommunicateb baspectsb bofb bab bprogramb blikeb bfunctionsb bandb bvariables.b bsyntaxb bisb bimportantb btob btheb bcompilerb bbecauseb bitb btellsb btheb bcompilerb bwhatb binstructionsb bitb bshouldb bgiveb btob btheb bmachine.b b

    Beforeb bweb bstart,b bitb bisb bworthb bkeepingb bab bfewb bthingsb binb bmind.b bunlikeb bpythonb borb botherb bhigh-levelb bprogrammingb blanguages,b bc++b bdoesb bnotb bresembleb btheb blanguageb bofb bhumansb bquiteb beasily.b bhigh-levelb blanguagesb blikeb bjs,b bpython,b bandb bc#b bareb bmadeb bthisb bwayb bbecauseb bitb bmakesb bthemb beasyb btob breadb bandb bmanage.b bc++,b bdespiteb bbeingb bthisb bway,b bisb beasierb bforb bmachinesb btob bunderstandb bpreciselyb bbecauseb bitb bisb bnotb bsob babstracted.b bthisb bisb bwhyb bwhenb bworkingb bwithb bc++b byoub bonlyb bneedb bab bcompilerb bandb btextb beditor,b bwhereasb blanguagesb blikeb bpythonb bneedb btheirb benvironmentsb binstalled.b b

    Principlesb bofb bprogrammingb b

    C++b bhasb bmanyb bwaysb bofb bcompletingb btheb bsameb btask.b bjustb blikeb bwithb bhumanb blanguages,b bthereb bareb bmanyb bwaysb bofb bsayingb btheb bsameb bthing,b bbutb bsomeb bwaysb bareb bbestb bsuitedb bforb bcertainb boccasionsb bandb bsomeb baren’t.b bc++b bisb btheb bsameb bway;b bsomeb bmethodsb bareb bgreatb bbecauseb btheyb breduceb bprogramb boverhead.b bmanyb bdevelopersb bwillb bwantb bthatb bbecauseb bitb bincreasesb btheb bperformanceb bofb btheb bentireb bapplication,b bandb bthatb bisb btheb bfirstb bprincipleb bofb bprogramming:b bcompleteb bab btaskb bwithb btheb bleastb bamountb bofb bfunctionsb basb bpossible.b bdob bnotb bmakeb bthingsb bmoreb bcomplicatedb bthanb btheyb bneedb btob bbe.b binb bmostb bcases,b bthisb bmeansb busingb bab bloopb borb bab bswitchb bstatementb binb bab bfrugalb bway.b b

    Theb bbestb bwayb btob bdob bthisb bisb bbyb bunderstandingb btheb bnatureb bofb btheb bproblemb bfirstb bandb bhowb bbestb btob bimplementb btheb bsolution.b binb botherb bwords,b byoub bwillb bneedb btob bwriteb banb balgorithmb b–b bab blistb bofb binstructionsb bthatb byoub bwantb btheb bmachineb btob bfollowb btob bfixb btheb bproblem.b b

    Yourb bdesignsb bshouldb balwaysb bbeginb bwithb btheb bthingb byoub bwantb btheb bprogramb btob bdo.b bthisb bwillb balsob bincludeb byourb balgorithm,b borb batb bleastb btheb bproblemb bthatb byourb balgorithmb bwillb bfix.b btheb balgorithmb bwillb balwaysb blookb bsomethingb blikeb bthis:b b

    Input:bbdatabbcoming,bbwherebbapplicablebb

    Processing:bboperationsbbperformedbbonbbthebbdatabbandbbdeclarationbbofbbvariablesbb

    Output:bbthebbresults,bborbbthebbactionbbyoubbwantbbperformed.bb

    Hereb bisb bab bverboseb bexampleb bofb bab bc++b bprogramb bforb bdisplayingb bhellob bworld.b bthisb bisb btob billustrateb bhowb bc++b bprogramsb bareb bcomposed:b b

    //b bsimpleb bc++b bprogramb btob bdisplayb bhellob bworldb b

    //b bheaderb bfileb bforb binputb boutputb bfunctionsb b

    #includeb b

    Usingb bnamespaceb bstd;b b

    //b bmainb bfunctionb b-b b

    //b bwhereb btheb bexecutionb bofb bprogramb bbeginsb b

    Intb bmain()b b

    {b b

    //b bprintsb bhellob bworldb b

    Cout<<hellob bworld;b b

    B b

    Returnb b0;b b

    }b b

    Hereb bisb btheb bstructure:b b

    Callbbheaderbbfilebbforbbinputbbandbboutputbbfunctionsbb

    Callbbthebbmainbbfunctionbbwherebbthebbexecutionbbhappensbb

    Printbbhellobbworldbb

    Terminatingbbstatementbbthatbbindicatesbbthebbstatebbofbbthebbmachinebb

    Web bcanb bseeb bhowb bverboseb bc++b bis,b bbecauseb bmostb bofb btheb bstepsb bregardb btheb bbackendb baspectsb bofb bc++b bthatb bareb bneededb btob bexecuteb btheb bcode,b bsuchb basb bcallingb btheb blibraryb bfiles.b byourb balgorithmsb bdon’tb bneedb btob bbeb bthisb bdetailedb bmostb bofb btheb btime.b b

    Despiteb bbeingb bsimple,b bthisb balgorithmb billustratesb bhowb bdevelopersb btakeb btasksb bandb btranslateb bthemb bintob bcode.b binb btheb bnextb bchapter,b bweb bwillb buseb bthisb balgorithmb btob bwriteb bourb bprogram.b b

    Asb byoub bhaveb bnoticedb binb btheb bexample,b bthereb bareb bcommentsb binb btheb bcodeb bthatb bexplainb bwhatb beachb bpartb bofb btheb bcodeb bdoes.b btheseb bcommentsb bareb bprecededb bbyb b//.b btheb bcompilerb bwillb bnotb breadb banyb blinesb bofb bcodeb bprecededb bbyb b//b bbecauseb btheyb bdon’tb bdob banythingb bbutb bhelpb botherb bpeopleb bworkingb bonb btheb bcodeb breadb bwhatb btheb bcodeb bdoes.b bitb bisb bgoodb bpracticeb btob bincludeb bcommentsb binb byourb bcodeb bsob bpeopleb bknowb bwhatb beachb blineb bofb bcodeb bdoes.b b

    Overviewb bofb btheb bc++b bsyntaxb b

    Web bhaveb btalkedb baboutb btheb bimportanceb bofb bsyntaxb bforb btheb bcompiler,b bbutb bitb bisb balsob bimportantb btob bunderstandb btheb bsyntaxb bofb bab bprogrammingb blanguageb bbecauseb bitb bwillb ballowb byoub btob bdebugb btheb bcode.b bjustb blikeb bwithb bhumanb blanguages,b bifb byoub bknowb btheb brulesb bofb bab blanguageb byoub bcanb bcorrectb byourselfb beasilyb bwhenb byoub bmakeb bmistakes.b bdebuggingb bisb btheb bprocessb bofb bfindingb bandb bremovingb berrorsb bandb babnormalitiesb binb btheb bcode,b balsob bknownb basb bbugsb b(whatb bisb bdebugging?B bn.d.).b bitb bisb bab bprocessb bofb bcorrection.b b

    Idesb bhaveb bdebuggingb btoolsb bthatb bhighlightb bwhereb berrorsb boccurb binb btheb bcode,b bbutb btheseb bfeaturesb baren’tb balwaysb breliable.b bforb binstance,b bleavingb boutb bab bsemicolonb btob bterminateb bab blineb bofb bcodeb bisb bab bcommonb berror,b bbutb btheb bdebuggerb bwillb bhighlightb btheb berrorb binb btheb b(.h)b bfileb binsteadb bofb btheb bcodeb bwhereb btheb bmistakeb bhappensb binb btheb bprogramb bfileb b(.cpp).b bmostb bdebuggersb bareb bnotb bintelligentb benoughb btob bdetectb banb babsenceb bofb bsomethingb bandb bwillb bthrowb btheb bverboseb berrorb bthatb btheb bcompilerb bgivesb bwhenb btheb bunterminatedb blineb bviolatesb bab bruleb binb btheb blibrary.b bhowever,b bab bprogrammerb bwillb bpickb bupb btheb berrorb bsimplyb bwhenb btheyb bnoticeb btheb bredb bsemicolonb blineb bdelimiterb bisb bmissingb bfromb boneb bofb btheb blines.b b

    image38.png

    b b

    hellob bworldb bprogramb binb bgeeksforgeeksb bideb bwithoutb bab blineb bdelimiterb b

    Thisb bscreenshotb bfeaturesb bhellob bworldb bwithb bab bmissingb bdelimiter.b bimmediatelyb byoub bwillb bnoticeb bthatb btheb bideb bhasb bdifferentb bsyntaxb bhighlightingb bforb bc++b bthanb btheb bprogrammingb benvironmentsb bweb bexploredb binb btheb bpreviousb bchapter.b bsyntaxb bcanb bvaryb bfromb bplatformb btob bplatform.b bthisb bisb bwhyb bweb bareb bstandardizingb btheb bprocessb bwithb bgeeksforgeeksb bide.b binb bourb bchosenb bide,b bsemicolonsb bareb bnotb bhighlighted.b bhowever,b btheb bideb bcanb bmakeb bupb bforb bthisb bbyb brecognizingb bandb bannotatingb bmissingb bsemicolons,b basb bhighlightedb binb btheb bscreenshot.b byoub bcanb bpracticeb bandb bexploreb bthisb bprogramb bbyb bgoingb btob bitsb bgeneratedb burl:b bhttps://ide.geeksforgeeks.org/mzbupp46sl.b b

    Itb bisb beasyb btob bseeb bthisb bwhenb btheb bcodeb bisb bsmall,b bbutb bwhenb bworkingb bonb bab blargerb bprojectb btheb btaskb bcanb bbeb bdifficult.b bib bhaveb bheardb bofb bprogrammersb bwhob bspendb bab bweekb bandb borb bmoreb btryingb btob bfindb borb bfixb bab blineb binb btheirb bcodeb bonlyb btob bdiscoverb bitb bisb bsomethingb bveryb bminusculeb blikeb bab bmissingb bletterb borb bmismatchb binb bcase.b btob bmakeb bdebuggingb beasier,b bitb bisb badvisedb bthatb byoub bseparateb bcodeb bintob bsmallerb bmodulesb b(whatb bisb bdebugging?B bn.d.).b bmanyb berrorsb bcanb bbeb bfoundb bandb beasilyb bdealtb bwithb binb bthisb bway.b b

    Letb busb blookb batb btheb bhellob bworldb bprogramb bandb bstudyb bitsb bsyntaxb binb bdetail.b bwhileb bsyntaxb bhighlightingb bmayb bvaryb bacrossb bdifferentb bplatforms,b btheseb baspectsb bofb bcodeb bareb bconsistentlyb bhighlightedb bonb ballb bplatforms.b b

    Comments:b basb bib bsaid,b btheseb bareb btheb blinesb bofb bcodeb bthatb btheb bcompilerb bwillb bignore.b btheyb bareb busedb btob bannotateb bcodeb bandb bleaveb bhelpfulb bexplanationsb bforb botherb bprogrammers.b bthisb bisb bgreatb bbecauseb bnormallyb bwhenb bweb bcodeb bweb bcollaborateb bwithb bothers.b bitb badvisedb bthatb byoub bleaveb bcommentsb binb byourb balgorithmb btob bsimplifyb bitb bforb bothers.b binb bmostb bplatformsb bcommentsb bwillb bbeb bhighlightedb bgreen.b bcommentsb bareb balwaysb bprecededb bwithb b(//).b b

    Headerb bfileb blibrary:b blinesb bthatb bstartb bwithb b(#)b bareb busedb bbyb btheb bcompilerb btob bcallb blibraryb bfunctions.b btheseb blinesb bareb bveryb bessential,b bsob btheyb bappearb binb beveryb bprogram.b binb btheb bhellob bworldb bexampleb bweb bcallb bab blibraryb bthatb bisb busedb btob bmanageb bstrings.b btheseb blinesb bofb bcodeb bwillb bbeb bhighlightedb binb bdifferentb bcolorsb bacrossb bdifferentb bplatforms.b binb bgeeksforgeeksb btheb bcolorb bisb bpurple.b b

    Statements:b bstatementsb bdescribeb btheb bbeginningb bofb bab blineb bofb bcodeb bwithb binstructionsb bthatb btheb bcompilerb brecognizes.b bthisb bincludesb bdeclarationb bhandlingb binstructions,b blikeb b"using…b borb breturn..."B binb bourb bhellob bworldb bprogram.b btheyb bareb balsob bhighlightedb bdifferentlyb bacrossb bmultipleb bplatforms.b bonb bgeeksforgeeksb btheyb bareb bhighlightedb bpurple.b b

    Functions:b bthisb bisb bcodeb bthatb bencapsulatesb binstructions.b bitb bmayb btakeb binputsb bandb boutputb bab bresult.b beveryb bfunctionb bisb bwrittenb blikeb bthis:b b"[function_name]b b()b b"followedb bbyb bcurlyb bbracesb b{}.b banythingb binb btheb bcurlyb bbracesb bisb btheb bsetb bofb binstructionsb bthatb bwillb bbeb bexecuted.b binb bourb bexample,b bmain()b bisb btheb bfunctionb bthatb binitiatesb btheb binstructionsb bthatb bwillb boutputb bhellob bworldb bwithb bcout<<.b binb bab b.cppb bprogram,b bintb bmainb b()b bmustb balwaysb bappearb bforb btheb bprogramb btob bfunction.b b

    Text Box 58

    b b

    Data:b btheseb bareb bvariablesb bandb botherb bkindsb bofb bdatab bfunctionsb bandb bstatements.b binb btheb bgeeksforgeeksb bide,b btheyb bareb bhighlightedb bblue.b b

    image31.png

    b b

    Comparisonb bofb bhellob bworldb bprogramb binb bgeeksforgeeksb bideb bandb b

    theb bgeeksforgeeksb bembeddedb bprogramb barticlesb b

    Thisb bscreenshotb bfeaturesb bab bsuccessfulb brunb bofb bhellob bworldb bwithb btheb bmemoryb busedb btob brunb btheb bprogram.b bthisb bideb bhasb blightb bsyntaxb bhighlighting,b bfocusingb bmainlyb bonb bcomments,b bstatements,b bandb boperandb bdata.b bcomparedb btob bgeeksforgeeks’b bembeddedb bcodeb binb btheirb barticles,b btheirb bembeddedb bcodeb bisb bmuchb bmoreb bdetailedb b(writingb bfirstb bc++b bprogram,b b2017).b btheb btwob bscreenshotsb bonb btheb brightb bfeatureb btheb blight-modeb bandb bdark-modeb bviewsb bofb btheb bsameb bcodeb bembeddedb binb btheirb barticles.b btheseb bviewsb bareb bmoreb bdetailed,b bhighlightingb bcomments,b bfunctions,b bandb bdistinguishingb bdifferentb bstatements.b bforb bexample,b bdatab btypesb bsuchb basb bintb bareb bdistinguishedb bwithb bab bdifferentb bcolorb bfromb botherb bstatementsb bsuchb basb busingb bnamespace.b balsob btheb bembeddedb bviews,b bunlikeb btheb bide,b bdistinguishb bstringsb bfromb botherb bdata.b bthisb bisb bab bperfectb bexampleb bofb bhowb bsyntaxb bhighlightingb bcanb bvaryb bacrossb bdifferentb bplatforms.b b

    Earlierb bweb bsawb bab bcode::blockb bexampleb bwithb banb berrorb binb bit.b bbelowb bisb btheb bveryb bsameb bcodeb bnextb btob boneb bthatb bisb bcorrected.b bimmediatelyb byoub bcanb bbeginb btob bappreciateb btheb bsyntaxb bandb bwhatb bwentb bwrongb binb btheb bcode::blockb bexample.b b

    image9.png

    b b

    Comparisonb bofb bhellob bworldb binb bcode::blocksb bwithb bgeeksforgeeksb bideb b

    Thisb bscreenshotb bfeaturesb bab bside-by-sideb bcomparisonb bofb btheb bpreviousb bexample,b bhellob bworldb binb bcode::blocksb bwithb berrors,b bandb btheb bsameb bcorrectedb bcodeb binb bgeeksforgeeksb bide.b buponb bstudyingb bboth,b byoub bshouldb bbeb bableb btob bseeb bthatb btheb blastb binstructionb binb btheb bintmain()functionb bwasb bincorrectlyb benteredb binb btheb bcode::blocks.asb bab bresult,theb bcompilerb bcouldb bnotb brecognizeb btheb breturnb bstatement.b b

    Ib bwillb badmitb bthatb bitb bisb bnotb basb bimpressiveb binb bab bfewb bcodeb blinesb blikeb bthis,b bbutb bbeingb bableb btob bnoticeb berrorsb bandb bexplainb bthemb bisb boneb bofb btheb bmostb bimportantb bskillsb bforb bprogrammers.b batb bthisb bpointb byoub bshouldb bnotb bworryb bmuchb baboutb bbeingb bableb btob bdob bthis.b btheb bmoreb byoub bcodeb bandb blearn,b btheb bbetterb bequippedb byoub bwillb bbeb btob bnoticeb bandb bfixb berrors.b bsoftwareb bandb bwebb bdevelopmentb bareb bindustriesb bwithb bab bhighb bfailureb brateb bbecauseb bofb bthis.b btob bsucceedb basb bab bdeveloperb byoub bneedb btob bsolveb bproblemsb bquickly,b bfindb bbugsb bmoreb befficiently,b bandb bfixb bthem.b bthisb balsob bappliesb bonb btheb badministrativeb bside,b bbecauseb bbeingb bableb btob bfind,b bfix,b bandb bexplainb bbugsb bisb bab blargeb bpartb bofb bdeskb bserviceb blevelb bagreements.b b

    Inb btech,b bserviceb blevelb bagreementsb b(slas)b bareb bagreementsb bbetweenb bab bserviceb bproviderb bandb bab bclient.b btheyb bagreeb buponb baspectsb bofb btheb bservice,b blikeb bsupport,b bquality,b bavailability,b bandb bresponsibilitiesb b(wieder,b bbutler,b btheilmann,b b&b byahyapour,b b2011).b bcomprehensiveb bslasb bofferb bab bdebuggingb bdebriefing,b bwhereb beveryb berrorb bisb bloggedb bandb blistedb bwithb bitsb bcause,b bworkaround,b bandb bsolution.b bthisb bisb btheb bbestb bwayb btob bdob bitb binb btechnologyb bmanagementb bfirmsb bandb bdevelopmentb bstages.b bhowever,b badministratorsb bhaveb bmoreb bresourcesb btob bdedicateb btob bdebuggingb bthanb bdevelopersb bthemselves.b btheyb bareb bcompensatedb batb bab bhigherb brateb basb bwell.b bforb binstance,b bwebb bdevelopersb bmakeb bapproximatelyb bb60,000b bab byearb binb btheb bus;b bwebb badministrators,b bthoseb binb bchargeb bofb bslas,b bmakeb baboutb b1/3b bmoreb batb bb90,000b bab byearb b(15-1199.03—webb badministrators,b bn.d.).b bthisb blevelb bofb bexpertiseb bisb bvaluableb bbecauseb bitb bunderstandsb bhowb btheb bcompilerb btranslatesb bc++.b b

    Firstb bprogram:b boutputb bandb bbasicb bstringsb b

    hellob bworldb bisb beveryb bprogrammingb blanguage’sb bbeginnerb bproject;b bitsb baimb bisb btob bshowb btheb blearnerb btheb bbasicb bsyntaxb bofb btheb bprogramb bandb bhowb bitb bfunctions.b basb byoub blearnb bmoreb blanguagesb byoub bwillb bwriteb bmanyb bhellob bworldb bprograms.b binb btheb bpreviousb bsection,b bweb busedb bitb btob bexploreb btopicsb blikeb balgorithms,b bsyntax,b bandb bc++b bprogrammingb benvironments.b binb bthisb bsectionb bweb bwillb bgob bfurther:b bweb bwillb bmanipulateb btheb bcode.b b

    C++b busesb btheb bcoutb bobjectb bfromb btheb biostreamb blibrary.b banb bobjectb bisb bab bmethodb bthatb bab bcomputerb busesb btob bmanageb bdata.b binb bourb bexample,b bcoutb bwasb busedb btob btellb btheb bcompilerb btob bprintb b"hellob bworldb bwithb btheb b>>b boperator.b bdon’tb bfreakb bout;b bweb bwillb bdiscussb boperatorsb bandb bobjectsb binb blaterb bchapters.b bforb bnow,b bit’sb benoughb btob bunderstandb bthatb btheb bcompilerb breadsb bcoutb basb bspecificb binstructionsb bbecauseb bthatb binstructionb bisb bdefinedb binb btheb biostreamb blibraryb bthatb bweb bdeclared.b b

    Now,b blet’sb blookb batb bhellob bworldb bandb btheb bcoutb bobjectb bbyb bchangingb btheb bprintb bout.b bfindb btheb boriginalb bcodeb bhereb bsob byoub bcanb buseb bitb basb bab breference:b b

    https://ide.geeksforgeeks.org/ea8zmekidob b

    image16.png

    b b

    hellob bworldb bprogramb binb bgeeksforgeeksb bideb b

    Thisb bscreenshotb bisb btheb bsuccessfulb brunb bofb bhellob bworldb binb bsplit-screenb bmode.b basb bweb bbeginb btob buseb btheb bideb bforb bcodingb bexercises,b bnoteb btheb binputb bandb boutputb bboxes.b bwhileb bthereb bareb bnob binputsb bforb bthisb bprogram,b byoub bwillb binputb bdatab bintob btheb btopb bboxb blabeledb binputb bgoesb bhere…b bwhenb bpromptedb bbyb btheb bprogramb binb btheb boutputb bbelow.b b

    Youb bcanb baccessb bthisb bprogramb binb btheb bsavedb bideb bhere:b bhttps://ide.geeksforgeeks.org/ea8zmekido.b b

    Youb bcanb balsob bviewb bab bcopyb bofb btheb bcodeb binb btheb bindex.b b

    Usingb bcoutb b

    Theb bcoutb bobjectb busesb btheb b<

    Hellob bworldb b

    Ib bamb blearningb bc++b b

    B b

    Likeb bthis:b b

    image30.png

    b b

    Addingb bcoutb bobjectsb b

    Thisb bscreenshotb bisb btheb bsuccessfulb brunb bofb bourb beditedb bhellob bworldb bprogramb binb bsplit-screenb bmode.b bwhileb btheb bprogramb branb bwithoutb banyb berrors,b bitb bdidn’tb bproduceb btheb bresultb bweb bwanted.b bobservingb btheb boutput,b btheb bprintedb btextb bisb bmissingb bab bnewb bline.b bweb bwillb bhaveb btob binstructb btheb bcompilerb btob baddb btheb bnewb blineb btob bgetb btheb bdesiredb bresult.b b

    Addingb blinesb bcanb bbeb bdoneb binb bseveralb bways:b bweb bcanb baddb bdelimitersb bwithinb btheb bstringsb borb buseb banotherb bmanipulatorb bobjectb bfromb btheb biostreamb blibrary.b b

    Usingb bescapeb bsequencesb b

    Althoughb bitb bmightb bbeb btemptingb btob bwriteb bab bstringb bwithinb bcoutb bandb benterb bab bline,b bitb bwillb bnotb bwork.b bitb bwillb bbreakb btheb bcodeb bandb bitb bwillb bnotb brun.b bdon’tb bbelieveb bme?b btestb bit!b b

    Youb bcanb baddb bab bnewb blineb bbyb busingb banb bescapeb bsequence.b bescapeb bsequencesb bareb busedb binb bmanyb binstancesb bwhereb byoub bneedb btob bintroduceb bspecialb bcharactersb bwithinb bstringsb bandb bcharacterb bstreams.b bitb bcanb balsob baddb blines,b blikeb bso:b b

    image23.png

    b b

    Usingb bin-stringb bescapeb bsequencesb btob bdelimitb bandb bmanipulateb btheb boutputb b

    Thisb bscreenshotb bisb btheb bsuccessfulb brunb bofb bourb beditedb bhellob bworldb bprogramb binb bsplit-screenb bmode.b busingb b 00029.jpeg ,b bweb bwereb bableb btob bgetb bourb bexpectedb boutput.b b

    Asb byoub blookb batb btheb bcode,b byoub bcanb bseeb bthatb bdoublesb bquotesb bareb bused.b bso,b bifb byoub bwantb btob baddb bdoubleb bquotesb binb bab bstring,b byoub bwillb bhaveb btob buseb banb bescapeb bsequenceb bsob bthatb btheb bcompilerb bknowsb bthatb bisb bnotb bab bpartb bofb btheb bcode.b bnotb bdoingb bsob bmayb bcauseb bunforeseenb berrorsb borb bbugs.b bthisb bisb bwhyb bescapeb bsequencesb bmatter.b bhereb bisb bab blistb bofb btheb bmanyb binstancesb bwhereb btheyb bcanb bbeb busedb b(escapeb bsequences—cppreference.com,b bn.d.):b b

    00030.jpeg :b busedb bforb bsingleb bquotesb b

    00031.jpeg :b busedb bforb bdoubleb bquotesb b

    00032.jpeg :b busedb bforb bquestionb bmarksb b

    00033.jpeg :b busedb bforb bbackslashesb b

    00034.jpeg :b bstandsb bforb bformb bfeedb bandb bisb busedb btob bgob btob btheb bnextb bpageb b

    00029.jpeg :b bstandsb bforb blineb bfeedb bandb bisb busedb btob bgob btob btheb bnextb blineb b

    00035.jpeg :b bstandsb bforb bhorizonatalb btabb bandb baddsb b5b bspacesb bhorizontallyb b

    00036.jpeg :b bstandsb bforb bveriticalb btabb bandb bisb busedb bforb bspacingb binb bverticalb blanguagesb b

    Note:b bifb byoub bdecideb btob btryb bdifferentb bescapeb bsequencesb basb btextb bdelimiters,b bbeb bsureb btob bonlyb buseb btheb b

    00037.jpeg00038.jpeg00039.jpeg

    b bbuttonb btob bsaveb byourb bworkb batb banotherb burlb btob breturnb btob blater.b btob breturnb btob bourb bexercise,b byoub bcanb buseb bourb bsavedb bideb bworkspaceb burlb b(https://ide.geeksforgeeks.org/psgblshe4h).b b

    youb bcanb balsob baccessb bthisb bcodeb binb btheb bindex.b b

    Usingb bendl:b binput/outputb bmanipulatorsb b

    Likeb bweb bhaveb bsaid,b bprogrammingb blanguagesb bareb basb bversatileb basb bhumanb blanguage.b byoub bcanb bexpressb boneb binstructionb binb bmanyb bways,b bandb bterminatingb bab bstringb bisb bnob bexception.b btheb bdifferenceb bbetweenb banb bescapeb bsequenceb bandb bendlb bisb bthatb bendlb bflushesb bandb brefreshesb btheb bbufferb busedb btob bstoreb btheb bstring.b bprogrammersb buseb bendlb btob bclearb bmemoryb bafterb bprintingb bab blotb bofb btext.b byoub bcanb bseeb bwhyb bthisb bisb busefulb binb bmemoryb bmanagement.b bendlb bisb banb bexampleb bofb banb binput/outputb bmanipulator.b binput/outputb bmanipulatorsb bareb bfunctionsb bthatb ballowb byoub btob bcontrolb binput/outputb bstreamsb busingb btheb b<<b boperatorb borb btheb b>>b boperatorb b(input/outputb bmanipulators—cppreference.com,b bn.d.).b b

    image29.png

    b b

    Usingb banb binput/outputb bmanipulatorb btob bdelimitb bandb bmanipulateb btheb boutput.b b

    Thisb bscreenshotb bisb btheb bsuccessfulb brunb bofb bourb beditedb bhellob bworldb bprogramb binb bsplit-screenb bmode.b busingb b 00041.jpeg b bweb bwereb bableb btob bgetb bourb bexpectedb boutput.b binb bab bprogramb bthisb bsmall,b bitb bisb bdifficultb btob bseeb btheb beffectsb bofb busingb bab bmemoryb bmanipulator.b bmanipulatorsb bonlyb bbeginb btob bmakeb bab bdifferenceb bwhenb busingb bthemb binb bcalledb bfunctions.b byoub bcanb baccessb btheb bcodeb batb bthisb burl:b bhttps://ide.geeksforgeeks.org/htcffytk71.b b

    Likeb bescapeb bsequences,b bthereb bareb bmanyb bmoreb binput/outputb bmanipulatorsb bthatb bgiveb bprogrammersb bmoreb bcontrolb boverb bdatab btypesb borb bstrings.b bmanyb bofb bthemb bwillb bmakeb bsenseb bonceb bweb btalkb baboutb bdatab btypesb bandb bstructuringb bclasses.b bhereb bareb bsomeb bofb bthemb b(input/outputb bmanipulators—cppreference.com,b bn.d.):b b

    00042.jpeg :b bswitchesb bbetweenb busingb b0/1b btob bfalse/trueb bforb bbooleanb bvaluesb b

    00043.jpeg :b bforb bmathematicalb boutputs,b bcontrolsb bwhetherb bab bprefixb bisb busedb btob bindicateb bab bnumericb bbaseb b

    "

    00044.jpeg

    "b bsignb bisb busedb btob bindicateb bnon-negativeb bnumbersb b

    00045.jpeg :b bcontrolsb btheb busageb bofb buppercaseb bcharactersb bwithb bparticularb boutputb bformatsb b

    "

    00046.jpeg

    "b b

    00047.jpeg :b bflushesb btheb boutputb bstreamb b

    "

    00048.jpeg

    "b bandb bflushesb btheb boutputb bstreamb b

    00049.jpeg :b breceivesb banb binputb basb bab bmonetaryb bvalueb b

    00050.jpeg :b bformatsb bandb boutputsb bab bmonetaryb bvalueb b

    00051.jpeg :b breceivesb banb binputb basb bab bdate/timeb bvalueb baccordingb btob bab bspecifiedb bformatb b

    00052.jpeg :b breceivesb banb binputb basb bab bdate/timeb bvalueb baccordingb btob bab bspecifiedb bformatb b

    Note:b brecallb bourb bconversationb baboutb bc++11b bandb bc++14.b basb bofb bthisb bwriting,b bmostb bprogrammingb bidesb buseb bc++11b basb btheirb bdefaultb bversion.b btheb bget/put…b bfunctionsb bareb ballb binb bc++11.b bifb byoub breceiveb banb berrorb btryingb btob buseb btheseb bmanipulators,b bcheckb btob bseeb bifb byourb bsetupb bisb busingb bc++11.b b

    additionally,b b 00053.jpeg b bisb bab bmanipulatorb bthatb bisb binb bc++14b bonly.b bthisb bmanipulatorb ballowsb byoub btob binsertb bandb bextractb bquotedb bstringsb bwithb bembeddedb bspacesb b(input/outputb bmanipulators—cppreference.com,b bn.d.).b b

    Omittingb bnamespaceb b

    Web bhaveb balreadyb bspokenb baboutb busingb bnamespaceb bstatements.b bweb bsaidb bitb bhelpsb bdeclareb bstringsb bglobally,b bbutb bwhenb bitb bcomesb btob bab bsmallb bprogramb blikeb bhellob bworldb bitb bisb bnotb bsob bimportant.b bforb blargerb bprogramsb bthatb buseb bseveralb bfunctions,b bitb bisb bgoodb bpracticeb btob buseb btheb bstatementb btob bdeclareb beachb bstringb bseparately.b bthisb bsavesb bmemoryb bspaceb binb btheb bcompiler,b borb byoub bwillb bfindb byourselfb binb bab bsituationb bwhereb btheb bcompilerb bisb bboggedb bdownb bunnecessarily,b bhavingb btob bpullb btheb bentireb bstringb bnamespaceb

    Enjoying the preview?
    Page 1 of 1