0% found this document useful (0 votes)
34 views

C++ Part1

C++ basics

Uploaded by

S ai
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
34 views

C++ Part1

C++ basics

Uploaded by

S ai
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 16
M panodacston o& OOPS ee nae t pools GYonds Gor, ONC ORiented Frogram mi AQ | 00s fs & pitten on Yd. basis a ObICA eden Programming & abou whiting Mocediack Hors hot ponsonm ofendtio& ontte dete, vAihe oriented PRog mos m ng js about (necting obsecue condo bor deder Ond bencHor’. ce Plo grroummning metodobogs [ Petadisnr. (on dbo be tenmed ox metod 40 SOMO SOE Programing fechnidee in vbICh Rocio ang wi iS prot yp 70 of is oS for digm ppoblem Olt ho Some f4K- epyh OF OoP.- Posing »[mnaere] Thhenitance v > 2 Encopcul #70 DyneumiC Binding oedeand behavior pornd, bike ELC - or. DTH Con be Phy ice and sosicd 95 abies % iugfonce Oe Ak gS obiect- ihe entty thet had a C++ Fon enomele: Chatty en, toby Keo is known om _. epics, memons SPAtG. ee eee gn CH obictt fre t entt td: TS obsets i & jeu" * \ ast prot OF obiects 5 ae ee => Co ennt? > Cos ib e passive” EnHt3 - > chess 18 & coflectior OF Gimifon FIC OF obset t+ > chess 1S not & neal wonld Cnt? 7 pis 4+ Jempare on bine fin [primed > Les I aed peiow | Dod — obsey Tn CH (eh is usenderined dcdetsre ube Wee AYA pompous ang Member Fumi HOows- dy Inhenitonce —puken one cles is Called iMhenizone e en chit inkenss He mofensres ob its Panes Ate He Mofents ob Chore CLS In 00?) He Comedy OF IMnhenitonce provides ype ihex or Rewsabilits- 2 ae te ve Can adh addyroned Gectenes 10 aH 1 Chas withour modiiging th. Ls | Sten ($58) Rosechss / | Ponows Chas [coe B | SE (dened Chasse wy Po by morePaivnn:= nid chess. ft won Phim is cuofken inmfontad—OOP Conceft Ubich is mbit a70n Or fwd words Git b POLY whith mecng is monphisn 1& 60M. p& fneex team, mers HO cbi Lit #0 7eke oO pony Getond zy fosamorP hisen phan OWE FORM. © Ok Pasymenphism is cubPose 16 40% Leheve Like « Ydou, pron? Rees, vice encumpl cag ROOM Yhet HME YOu in menket Ct het pime you behave LiKe co thet HOE ane in Ch won you one nn Cespomed, When you OF Souk home you fehare ike a Sou on daughrer, pene one Pers oF qresed th dikeened — diggened Lehovio ls SP NpsanecHion fost Hiding ihpennal dete > Rech Lire enomple Ol Patrons poseni7es /s when you chive Cae SOU use Steonng uneey accebenstoly ath ond break bit you one var Khow chow how red designed 70 do Hoot Gut (org | » EncoPsud tion 2 The wheapping [Binding oF deta and Son wa . ar Sing ea * Singhe unig 1b KMowN as enlepsular{on- WB ond Yhowind Grunt sion WI» ips nO ae? = Cop sly Dynamic Binding — ‘Donnie pes uncapped wl Gibtener— medi'Cibex >In dynamic binding, decision is red@ at nentime NE Geng: ing phe (ode ther with Le Rew TA REPO Jo Q GuncHar cu, -2Por His CH Sufhones Ui Fen chou “7 Dynamic Binding 's also Catbed Late binding [Ion tine. binding, 57 Message Passings ~ obiects Communic with OK] to anottar by ending ond Nec ivind jngormetion fo Gch OHOL Hilo), menage. Pushing « ay This Fane He basic Concert or He OOPS CHE bet jm oops Here one only 4 Princifhes- pAbsHatsioy D encapsebsdios DTnhenitomce 4 Pol3 mon Phism - > O0f iS besten ond Cusien to ener? —7 00? provided ce Cheeur cynuctere Gor ~7 O0F abes 70 Keer re Cet Che DRY “ Done Reresr 3 (ond mower yur cope easienvo meygonn modity ond lieu Ho Phage’ A a wy oof MaKe i+ POSsIbJe 40 Cheg part ions with fous Code camp coe he. q sito obie(t omened Language- urge the Cefpokss “Phognammtn g with obsecy exted Pnognomming fonguage . 4 Mbt PLVMOP Mey ore is Cope Movide dada binding whereas in pop cd deda Cn be Alle GROM Gay kena” 108 90 50 Long ane said #0 be obset - on 2 Gmedd talk pnognamming fowguage (S140 184+ Pately peer oriented Proghamming Jonguode - 2 Bromple oF OopL is C+t, Jove, Phayhon, PhP exe. + is not Paaety DbseCH oniented programming Lemnse « hos aly Obie oniewed mognamming Songuage. othr ib Pane [ppbicetion Ob OOPS Dobie+— CRieue d. (biew TT ingrog gnc’ yo Cheat inredned CopPbict in cyem provides HE cenvele SY onientd Served. ng ODE fod-time Cysiem. design- fed. pime System invent? cometntained mee aE og |e easiea 70 hang le fo build thom OOP Fechniqucd ak fro ComplextHes - P isfea Jer _ond Hater nel JHsfecfeny Is Similor 70 Regular tod os iy Coun be $70%4 Searched, cur edited exsild Uyten medic OK HC Hed. chomp ts a. Cufenser Or hyleasend- nsno dustin #0 >Ctt ! 7 Tt was dev Regd fabonatoni 8 > Ctr Iw as CE is on enters concept o& OOPS: > Te Is a eas > C was deve Loped inta7e by Dennis Rigchic. wt Bess fob >c is aw Procedend Oriented fanguee. T+ dock not SuPfont oofs Gecdunee Such ae (ols morphism, encesssulution curd inheritance . lisa supser ob Ott Chas 29 Key wordt 5 an obiecd — ORlenred. PROYROMMING Language. eloped by Rianne SHovatenP ct ATT jn USA into Conty (4 O"S. power Fuh genenel Per Pace Programming Sanguee jon OF C with A Major addition of also Khown as Sefer S24 oF BC- Ce > c+r wes Aeubored by Biorne Sprowsrup ar Beil feb inthe. Curly 11%0S. > Ctt 1S bork a Procedunh aud an ODIEtF-~ ontewed Preagham fonguase- T+ Suffords 00F bentunc Seas Foy mon Pris, Cn Capsd At ond th bopiton e@- > CH IS & SoPEA SCH O6- key wonds ( masts) ittenow- iy dittelert Vee crt has 63 Cd V f SE EEE pe File Cderion 06 & PRogram.-7 The Gile e@ MEHEION OF & CRE q ey in € Janguage is "°C Prognam ic “cpp”. 003 HoH not hi Tr 4 p ave any It heh access modision oe mod ier en , yl useg (SAdio-hy headen sige DCH wes instream 4> header ip inp (OPS OfeNc#l ons, Gide Gor infer [OutPe Ofenetions ND upford GOR ingoRMer/ of ~y Data is Secuted and hidden iain ° by En caps tion - No diners SufPRIS6O NR “> Su PORBEK COPFI0H hand.ling, eycepHon hand Lind Cue ccane0) and printéc) > CHE user CIN Oud Cot FOR 4 ' Gor 1 (0° unt Or 7 Doed nor GupfoRd Fonction and pence. 0 ventoadind. r/o- > GupPORHs GuncHion and openedor oventoading. Tokens in Cttl yA Ct Program is composed ols FOKen& which ane He Gmelles- mnrdividud nis. flena one 6 43fe& of FOKeW in Cit! — Dkeywond DTdemsiviens > Comdosts 4 Cana S 5> Sreci ed Symbos& > ofenatons. CHE PROGRAM — P cprucsahe OF pgpreele Document t1or Link secHioy Talobo Degint#iou Der ken ti 04 are ton Degtnlt fo 4 10 pain Gunct/oy Lectio4 Hinchade CiOssne ams using namespace Like ¢, He C+t frog 4" = yeago wontd L ; pam rs a cablecs(on 7 The above exompte contains onby one mein >- iy Asusuel C + execution begins at OG~ GUNnct/or’ - Bunctton 12, moatuc)+ zy Bveny C+ PROZIZUM Mest have A mMoln CD. ay LiKe G HKe Crt Statremed? per mihate with semi calor) Cores Comments in Cth The doukte cles, comment ts besicesy A Singse Lin@ Commer: SS TSM Ging Program. r ThE C Comment Cymboss (Vane C4ip0 Veard ond a , ae mone Suiteble Go RMA MINE Comm arts. ye ae This Bb on exanbe 0G Ctt PRogham This is my GIADA POS Ray a) poadeke Gide weave used yhe Golbowing #tinclud e AinecH ve in ye propre" « + “include iosneans> >This directive, uses He Meffocewson +o add. He cones OF Ho jostieam Fe fo He fhoghem. “y The headen sike Vastneam Shoud be include et 42 beginning 06 oth PRAIRAMS Phot sO inp (Odd Chetemert psemecun C1 inpedt Basically iF hed Q PoRé& one is Che OutPt ctieam,). uneam) and OMEN One is OSHREam “70 spneam Contains Aetlonations FoR te (hentib ea Cour ond He ofeneton << - ~ oitineam containg decsanraHord 50% le. Idetoien CI ond HO >> - The naming Convertors GOR Some old version oFCtt we a header lOs¢neam-l .Thisisone oo + Chang ef (utto: CH. In funbo c++ we use header C7109 may vers Song G12 Called duced by AML eam oh 1 Noumespa.ter | lamenhace anew Concert intfo duced 64 Yoo py 2 6 Cy | Stonponds Commitee - -y This depineh & ceope GOI He (dent Gent ted mg a | used in a PROhes- ‘ |-> For valvg He (den & yo veing Ainecsive, LIKE teng dekined (N HO famesperg . S bing and namegpace one He new Keywerd OF Ci \ natn C) (oe | ly huey CHt PRogham muse hoye a maine) | outer stetomon(ofenston > C6< ‘_y The ONLY Gpatement in ebove Crampse ts an Cth SHdemest - -y The Sted emert , cour (¢ “Hello world? causes se CHUUY CH Puctetron He scneen. -y This Ghetemert insno duces two new CHT (reabute$ i ee mans tobe dh plecsed of The identisted Cout 1S & PrEdObired Obsece Shot A gums He. Senden d ouiter. Skea (A Cte. pene, He Chanderd oth Stream. Pefresey. 19 A cneen po ofencdol << is catbed He tweentio OM Put +0 yt penton” pth iment COR sends) he contews Ob He Vaniasso on ib pught tO HO ObiC(+ ON peti [Gt- Screen ZL [eoue Ox Frese? i jnsentiou , . obie (4 eee o galie pecans Qepunn Tyre os morn ) ment) peturnd an Integer ay pe vedue 7042 ain Ct+t, Ofending Sytem. 2Thenorone every meine) RO feNu OStetement. opehw! in cee Mowd end with (0 A WedNlyg OfLon CANO R Mint Occed- > The deoaus netenn type Gor els Gunctons mh Che £6 int. “Keswond = the Key wonds t > They ane eu peidtsy imploned Sfecieic Ctr Language bea | “fey nescnved IAOHb1CM ond Cony ct. be used 08 Name, Gon He fhoghom Venables ON ote, Lag 4 Phognam elenerds. i hy In C+t, ford 634 Keywords ele avotlebte (4 ¢44 oy cHt Key WOnd added) io Ast CH key words One! aam douse new Switch GutO enue ofenatok tem flere pieak chum PRivede thi & Cas @ exter Proters+ed th low | Catch GLowt Pebbic thy hod Gor Register predec cles Grend petenn unrort CONS 4 goto Short unsigned Continue ic sighed vindued debut —jnbivue = Size ow vord deret+ & ive Shane Vol dolla do Long stnuct walle Added bY AN ST CHE booJ ex Port RINFER MNES COEL Rename Const Cat babs @ Ste Cade eG Ayman ic case mutable gue coer Onphicle Namespace +3Fe i) ¥ ghontisiens pdeureters jnerer to He vrame Chemes CHC- cnecded by HE frog¢Mammen - OF Vainjobs es, Sunrctroug, Cee The Gosowind pues ane common #0 both Cand Che pons abphaberiC Chanacsers, git ond underscores ae penn ped: The hame Conroe rang with a Aight we Uspenles® ond Jowergcso S0stee8 ane distin(t- ¢ A decsoned Keywond Comor $2 Hed Ba vaneble rane, gat Cong teu: ~ > Covstowt is an entity thet ete? +O Cineg value ond It Conte be modict B -y (ongtods one dite velvet pred vever Chonge tei hk vdue duning filogitawn CVE - YLIKE C, Ctt Suffor# evened Kinds oF Litencd Costes. > Gl2S, 66, FF -- - © <7 12-5) 12-84 (6. - - 2 single chanacte > “a', Bl %! Lgl. 2

L Hb!) L K94.. gntegen Ccostont Gading Point Costes Chotee FON constout < ‘aie, Covstad 7 car", egsos Fl 23". Coser dida_type vonieblename » | Stung! > Caring s che Nn Hh a nud ChonercseaC “ol. i This pnd Chanatren jndiceteR He Cad ob- we obi ork) M9) brde An epi OF, hanrtren os, A & ane alweys en Closed in Kouble-Zuates, | Ee CSHelings | Decdeneton bor, tive | Se chan eros = LH, U0, ‘0! h: > chon string l2B= = He94o"V; | > schon croing E-] = “Helle, | Social Sumbotte The Eolgowing Sumboss oe used in C having Some creciey |r and yhus, Cannat be uted Go, Some other Punase. A cee, bite Be FATE | Dated ofepedon_ one infed Sdened + | the spedenedt Cin>> numben 1° i. ji san ined Sineom and. Causeg He progreun #0 wels Gon HE ven J0 #90 in conumben. The number Keyed in is placed nr Nonio® nuserd The jdewisien "cin" is & pre deeived obits nCtt thet comnesponds, jo HO ¢fanford inped Lene as - Hene. thts i SHReom pemeseds He gegm- keyboard » |The crenccton. >> is brown ag exinrecson on get b-nom Here ie Chyna He valo Grom fre keyboand and assisvs pre Yee Vonicdno only? Wart. | Wei . q x oy This is Simidon fo fe Slon bi) buucstion mC- Eytneczion ofen 20 voneble Row’ aa jPindude using, nomesrace +d’ int madu () i it Oy bp Sey cou (0° Ewen He mumber Gor oo cin s>%, cout (7 Eten He numer bon b’ ceet cin dSb- Cum tb coe” The SumoeXKC a C Mond Ce bE Re petunn 0, outta Enter a number boi & sd Bre a number Gor b ged The Gum a S ond 6 Is UI oN endl In CHEE PCrasae lee eae ane Conds! in CHt, & FROSRemmiug Songuage, | StowdS FON end Ob-LIME ls he we oF He Onkl Cte Memitd 1003 taxes tase | fo move ye cursor 40 He begining a HE vert Line, VTFS Working Is SimMeh to xhe VW! Cccape seduense Hindu de Ciostnem> Using Negresrace 4b; in Moin C ) int Ab \ cour ("Enter HE Number Gon a and bY I cin »apdb; | cot (i 7e yalne OF als(( % (Cendl: i cout {The velue or b is ({ b¢( Crd Ly azrath; boa-by arab | Cott (Abten SneP Wo vere of- a a cendd! CO (“ATION Lue? sto Vale oF- bb Ord | 4 REAR 07 } Enter He mumbor FOnaad b 10 20 The value on gis 1D The Value og bis 0 | Abven_ Swap He vabo Or AF 0 Sure? eine: oe ne. <

You might also like