0.1. Destructores "!$#%&('!*)+,.-/'& #10"324'654&789' :;,'<>=()1'?@54-;'?.54-A!;(BDC&'4' -AE)%<F' G:;'F)+ -/'!;' -/HI2'><>'<F&-/#%2#1KJE<F#%4LM)ONPRQS TIUWVESXKTY2'>54(Z.)+&!;'['?!\5((]^5((.#%0&3_"5(' '?!\)%)%&<6&24&5:;"<6JI:;#+ &<F' G:;'[ 5(EK2Y')"789'.:/!;'`2'?!9:/-;54a"'[."b' )Wc(d2'`)%#%7K'-/&'?!$'`-;'?.54-A!$ 5(EK2Y')"789'.:/2'$89'>2'>'.e#+!9:/#1->f^)+&!g-;'C&)+&!g_"5('`2' :;' -/<F#1KEd 5(EK2 54@"789'.:/2'54( )%"!$'!;'2'!$:;-/54a"'!$"Z)+&!h<F#+!$<6"!i_G54'=(E-A6.5KE)+_"5(#1'-Hj&-;#+E7()1'"k !/E)%#1-F2')hJ&<[74#1:;l!;#m'?!FE5:/&<6JI:/#%4BW)1)+E<6&2(n3oRpqGp"r4pn!;#h'!F2#%(JE<F#+ 4BWc(KE)2' ) =4-/&C"-/&<6Y!;#O'!*C&)%&7KE)O@'!$:/JE:;#+ "s.L)2'?!9:/-;5Kt:;"-*:;#%' 4'6')O<F#%!;<F,4&<`74-;'F_G54'6' ) &(!$:;-/5(t:/&-h=M' -/>=(-;'?.'24#%2F2'54K`HRu%-;C"54)+Zf9v&sa4>:;#%' 4'&-;C"54<F' G:;G! L wMx?yDz qE{4op| xE}(~ rRpGjM { ~x?yRy jDp ~? z p ~ ro ~ rRG{ z ro"r }4~" xy r$;O z qG ~G~ p ~ rRG{ z rG{4R"o x?y ? xGz oR"r }(~j {RKq xGz p ~ rRG{ z rG{4&o x?y xGz W x?y rO x?y r x?y r zE R ~xjGy zxE}&y opDpj } x 4"y p&o"r }4~ R {Rr x q x R zxE}&y opqGDpj } x ~x?Gy Go E O E & Kz z&} {Rr(|R|MII( Rp"r }z 4pGGo } I|G|Gp y o4qW G op ~ rGG{ z r } vEp ~ rRG{ z rG{4R"o x?y j x"z W I R ~ pq x (p"4q"¡Dp? } x ¢ ~xjGy Go opq"p"r4p z&} {Rr(|R|MII( Rp"r } op ~ rRG{ x o } I|R|Gp y o4qW G"£ { yDzRxE}&y¢ {RKq xGz O@ zRz p"opq"rR x R{r }¡ G ¡DpGo x y r4ppqq }(~ opqGp ~ rRG{ z rG{4 xy r ~ {&D R q } xG~ }¤ {4p ~x~ p¥R{R x p ~ pp ~Gz x r } R j W¦ R§O j ¦ § ? ¦ 4p"r"{ y E§ E§ & }(x o £ x?y r yD& x?y r x R qRq"jDGo¢q zE}&yD~ rR"{ z r } p ~ rR"{ z rG{"o x?y j xGz } rR4DO R ~ p¢{ ~ q" £ { yDzxE}&y {RKq xGz z&} {r4|R| y § } rR4 ¦A~ {&M |R|&p y o4q R qqRq"p "q £ x?y q¢opq¡Kq }"¤ {(p R ~ pop ~ rRG{pO@qRqG?DGoRqop ~ rRG{ z r } R &{Rr } D"r xGz jDp y rp x?y r¢M x?y z&} {r4|R|M x Dp"4¡qRqG?DGo £ I |G|Gp y 4o qW £ z&} {r4|R|M ~ p { y o¡qRqG?DGo £ I |G|Gp y 4o qW £ E)%#+24F2''!$:;'*=4-/&C"-/&<F(k x Dp"4qGqGjDGoR £ E4 Rp"r }z pRGo } E4 Rp"r } op ~ rRG{ x o } ~ p { y oqGqGjDGoR £ E4 Rp"r }z pRGo } E4 Rp"r } op ~ rRG{ x o } 6 d !.#"Z %$'& m )( * ( + [W , &24,HI&-;#+E74)%'Y2'Y54(b )%"!$''?!54Kb-/' =4-/'!;' G:/".#%0&l2'Y5(l:;#%=K3E7(!$:;-A&.:;b2' 24I:/"!' 5((i:/54=4)+\2'mHIE)%&-/'!L !$:; '!B?' )."":/' 4#+2 2')+iHIE-/#+E74)%''?!9:AJ\."<F=454'!$:; =K"-)%"!Hj&)1"-;'?!2'\)1G!24E:;G!2' c(4#+2"!2' G:;-/[2'g)%[.)+&!;'&.L -"-:/&G:;(BG)+&!;#1C"(& #10" ."(!$#+!$:;'*' Z)%6 &=4#+>2''!;"!hHIE)%&-/'!L >)1G!'$89' <F=4)%"!WHR#%!$:;G0! /(&!$:/g1 /4"-/(B)%"!I:/-;#%745:/"!W2'h)%"!.)+&!;'!=K'-$:/' 4'?.u+E`\:;#%=M"! =4-/'2' c(4#+2"! ' ,+2%2 L #O!$'6&!;#%C&(Y54n"789'.:/Z2'F)+&!*.)+&!;'!gHR#%!$:/"!*Y&:;-/Y&7489'.:; 2'*)%F<F#+!$<6F.)+&!;'&BR'?!9:A`"=K'-/".#%0&Z.&=(#%&-/J`)1G!hHIE)%&-/'!h2'*)1G!24I:/"!h<F#%' <[7(-;G!m24' ) &789' :;3b)+n2'-;'? /(n2')%d&=M' -A& #10"2'"!$#%C&K&.#%0&'¡!;5(!>E(J&)1"C&"![2' )h&7489'.:; )+64# 3_G54#%' -A24Y2')"=K'-/"2&-g2'`"!$#%C&(".#%0& BKC&'4' -AJE(24"!;'54b&7489'.:;Z."-;-/'.:;(L #1 ' <`7(E-/C&KBI'!$:;'i=4-/.'?2#1<F#%' G:;&=4)%#%&2*)+.)+&!;'\p ~ rGG{ z rG{R4"o xy j x"z 24'.c(4#+24 ' `)% !$'? #10"`EG:/' -/#1"-4 =4-/R245(.'m' )R-/'!;54) :A&2 E=M'.:/'.#+2KL 5\-A1 30&'?!W)% !$#%C&5(#1'":/'&B 0.2. Asignacin y paso por valor de objetos como argumentos ')424I:/<>#%' <`74-/*24''!/ )%"!$'h'?!O54F=454G:;'-; 54(*'?!9:/-;5Kt:;5(-/*2'h:/#1=Mo&r }(~ L #(!;' 5:/#1)%4# 3h' )&&=M' -A&2"- 2'&!;#1C"(& #10"g=(-;'?2'.c((#%2KB !;'.&=(#%&-/Jm' )&Hj&)1"- 2' )G24I:/<F#1'<[74-/ 2'65((b.)+&!;',f 4s*')%@&:;-A4L )HIE)%&-2''?!$'2(I:;,<F#%' <`74-;,'?!54l=45(":/' -/(B =M&)%Y:AEG:;@)%,_"5('F!;'F.&=(#%&-/JZ!$'-/JY)%@2#%-/' #10"d2'F<F' <F"-;#+Y'2&(24'>!;'6E)%<F".'( )+['?!9:/-;5Kt:;5(-/F2' :;#%=MFo"r }(~ BR4F)%"!h &<F=KG!2'*'!/`'?!9:/-;5Kt:;5(-/`' Z54(>'!$:;-/5(.:;54-A &=454G:/"24>=K"-\' )W &<>=M DL(,)+Fc(C"54-A 4L !$'=45('2'`H&' -5((6-/' =4-/'!;' G:/".#%0&@2' ) &G:;'4#%24[2'\)+<F' <F"-;#+2')M &<F=45:A&2"-' Y'!$:;'\&!;(B&"7(! -/H&'!;'i."<F' )M'!$:/"2 c(KE)2'`)+<F'<>"-;#+(Y'! ')24'!;'&24(B(')O.&G:/' 4#+224'`)+<F' <F"-;#+Y"!$.#+&2( 4d!$'-/' =()1#+ ,'' )m."":/' 4#+2n24'YDL \4#%E<F' G:/'!;'Y."=4#%b' )HI&)1"-`2' DB_G54''! 54=454G:;'-;KB"=M' -/[([' ) &G:;'4#%24`2' )%[HIE-/#%&74)1' E=45(":A&24=K"-m') BG54(`'!$:;-/5(.:;54-A &:;-/'! &<F=KG!2'*:;#%=K6'G:;' -/(L!9:A6.#%-/ 54(!$:/EK.#+`=(54'2'=(-;25( #1-f ' G:;-/'*E:/-;G! =4-/&7()1'<F"!/s_G54'h' )=4-/&C"-/&<6\!;'m#%G:;'-;-/54<F=(4Bj'?!O2' #1-?BEE54F."<F=4#1)+EK2 !;#%`'-;-/&-/'!B '?!9:/"!g=454'24' 3=4-;25K.#%-/!;'['n:/#1'<>=M,2'>'989' 5(.#%0&L -"- '$89' <F=4)%(B'n' )&!;2'>)+ 2' c(4#+.#%0&FEG:;'-;#%&-?B?' )(!;#1C"54#%' G:;'D xy =4-;25K.'h54F' -/-;"-'>:;#%' <F=K24'm'$89' 5(.#%0& B &))%)%&<6E-`24"!`H&' '!>."(!$'?.5:/#1HI&<>'G:;'YdoRpqGp"r4p,=(&-/n54(b<F#+!$<6d2#1-/'.#%0&24' <F' <F"-;#+4L x?y r¡D xy p ~ rR"{ z rG{"o x?y ? x&z 9 O R oRp z qGE4 zRxI}Ey op " x EKqGp ~ R } }(z & { y p"R } O R"£ xy opq }" 4jDO ~ p qGqGjD" qop ~ rR"{ z r } ¢op op¢ R qG ~ p { y oRqRqGjD"o } }(z { y p"R } p y r x pj 4} oppG Rp z { zRx &y )4 &<F=M&-;:/E<F#%' G:; &2'?.5("2*2' )"=K'-/"2&-2'&!;#1C"(& #10"[!;'=45('2'h&7K!$'-;HIE-W' >)+ c(C"54-A (L BG"7(! -/H&'!;'g &<F>' Z'!$:;' "!$F!$# !;'."=4#%&Y)%"!E<F=KG!h2'*)%>'!$:;-/5(.:;54-A &=454G:/"244L \(!$#1:;5K&.#%0&!;#%<>#%)+E-!;'i=4-/25(.'i 5(EK2!$'\5:;#%)14# 3' )(=K&!;=K"-HIE)%&-2'\Hj&-;#+E7()1'?! &<F>&-;C"54<F' G:;G!24'g]^5((.#%&4'?! L'?!$' "!$KBG&24`=(&-/J&<>' :;-/[-/'&)D24' )+>)1)+E<6"24 !;'[."=4#+6' b')=KE-AJE<F'.:/-;>]^&-/<6E)W.&-/-/'!;=K"(2#%' G:;''b)%2'.cK4#% #10"b2'[)+6]^5((.#%0& B "2' <6J&!W=4-/' HR#+E<F' G:/'h!;' /(*2'i.-/'&-54FG5(' H& &7489'.:;KBI' F' )4_G54'i!;'."=4#%&-/Jg' )HI&)1"2')4=(&-/J&<>' :;-/g-/'&) B&=K"-'!$:;'<FE:/#1H"(BE!;#K!;'5:;#%)%# 3?*<>'<F&-/#%*2#%(JE<F#+ (B&!$''<F=4)1'?E-AJ ')&=M' -A&24&- y p&L -OE-A,!$")15K.#%&(&-'!$:;'=4-;"74)%' <64BW!$'Y!;&7(-;'? E-/C"Z')."(!$:;-/5(t:/&-?B 2' c(4#%' (24Z5((ZH&' -A!;#10"d_G54'F-;'?.#%7K'6 &<FZ&-;C"54<F' G:;Z54(Z-/'.]^'-;'(.#+ &(!$:/&G:;'F 54KFHj&-;#+E7()1'2')<F#+!$<FF:;#%=M(L -"-\'989'<F=4)1KB4' )W."(!9:/-;5Kt:;"-i2'[ &=4#+62'54K.)+&!;' :;'(2-AJb54=(-;&:;E:/#1=M z&}&yM~ r L' ) "!$b24' )h=(&!;b=M&-`-;' ]^' -/' ( #%,( ' eR#+!$:;'n(#14C 4=(-;"74)1'<64Bm4¢!;'d &=4#+')*Hj&)1"-Z24'd)+HI&-;#+E74)%'d!;#%4¡_G54'l!$'d5(!/ 54l4"<[74-/'FE)1:;' -/(E:;#%H&lf !;#140"4#%<>Rs =(E-A ) L' )!$#%C&54#%' G:/'>'$89' <F=4)%,!$'6<`54'!$:;-A &<F-/'2' c(4#%-')g"=K'-/"2&-Z2'3"!$#%C&K&.#%0&2'd]^&-/<6&24'.5K&24a!;'n'?!; -;#%7M'n' ) &(!$:;-/5(t:/&-h2'."=4#%(L i0&:;'!;'*_"5(' '@' )&=M' -A&24&-h2'&!;#1C"(& #10"46!$'*5:/#1)%4# 3 y pE &)h &G:;-AE-/#%d_G54'@' ¢' )\&!;d2')\."(!$:;-/5(t:/&-F2',.&=(#%(BO'!$:;3'!62'74#%24ll_G54'@' ) "789'.:/**)+*4# 3_G54#%' -A24*2' ) EaG /K*-;'?!$'-;HI&24g<F' <F"-;#+ 5:;#%)14# 3&(2 y p&`.5KE(2 ]^54' 2'?.)+E-A&2f )1)+E<6&(2`&)K &(!$:;-/5(t:/&-m.&-/-/'!;=K"(2#%' G:;'jstL 24#% #1"(E)%<F' G:;'\!;'\'?!; -;#%7M' 54 &(!$:;-/5(.:;&-=K"-2' ]^'t:/[_G54'g!;'i'$89'.54:/ 5(E(24[!$'g2' )%&-/&>"789'.:/"!24'\)+.)+&!;' p ~ rR"{ z rG{"o x?y ? x&z *!;#1@'?!; -;#%74#%-hF &G:;#%R5(& #10"Y:/-;'?!hHj&)1"-;'?!m' G:;-/'*=(E- G:;'?!$#+!L 1436 4827 a.p 4827 a.p 1435 7896 b.p 4827 b.p ? 1434 ? 4827 1 a.p−>x 1 a.p−>x 4828 2 a.p−>y 2 a.p−>y 4829 3 a.p−>z 3 a.p−>z 7896 ? b.p−>x ? b.p−>x 7897 ? b.p−>y ? b.p−>y 7898 ? b.p−>z ? b.p−>z estructura_automatica a(1,2,3); estructura_automatica b; b=a; W#1C"54-/ (L k , "":/' 4#+2Y24'[)+6<F' <F&-/#%6:;-A&!)+'$89'.5K.#%0&b2'`)%"!i#%(!9:/-;5K .#%&('!i_G54' c(C&5(-/&>&)4=4#%'i2'i "24 <F&=(4B&#1)%5(!$:;-AE(2*')(."<>=M&-;:/&<F#1'":/ 24' )4"=K'-/"2&-2'i"!$#%C (& #10"Z!;# !$'-/'24'.c(4'"2' 5(&24&<F' G:;'*.5(&(26!;' 54:;#%)1#43F<F' <F"-;#+`24#1(J&<F#%4L 0.2. Asignacin y paso por valor de objetos como argumentos 1436 4827 a.p 4827 a.p 1435 7896 b.p 7896 b.p 1434 ? 4827 1 a.p−>x 1 a.p−>x 4828 2 a.p−>y 2 a.p−>y 4829 3 a.p−>z 3 a.p−>z 7896 ? b.p−>x 1 b.p−>x 7897 ? b.p−>y 2 b.p−>y 7898 ? b.p−>z 3 b.p−>z ? estructura_automatica a(1,2,3); estructura_automatica b; b=a; W#%C&54-A 4L k , &G:;'4#%24Y2'[)+6<F' <F"-;#+>:;-A&!\)%6'$89' 5(.#%0&n24')%"!i#%(!$:;-/5( #1"4'!g_"5(' c(C"54-AEE) =4#%'d2'l "24<6E=K4Bm#1)%5(!$:;-AE(2' )*.&<F=M&-;:/&<>#%' G:/2' )*"=K'-/"2&-Y24' "!$#%C&(".#%0&Y!;# '?!h-;'?2'.c((#%26"2' 5(&24&<F' G:;'"L wMxyDz qE{4oRp| xE}(~ rR4pR { R~ x?yy jMp ~j z p ~ ro ~ rGG{ z ro&r }(~" x?y r$; z q" ~R~ p ~ rGG{ z rG{R4"o xy j x&z o"r }4~? {GKq xGz p ~ rR"{ z rG{"o x?y j xGz x y r¡O xy r xy r z "y p&o"r }(~ D & D & D " Kz zE} {r(|R|K }&yD~ rRG{ z r } ¡ "Rr x oRpp y r4p" }(~ I|R|Gp y o4q v&p ~ rGG{ z rG{R4"o xy ? x&z oRpqGp"r4p zE} {r(|R|K 4p ~ rGG{ z r } I|"|Gp y oRq p ~ rR"{ z rG{"o x?y j xGz G z&}&yD~ rRG{ z r } 4} oRp £ p z r } "y p&o"r }(~ D & D & D " zE} {r(|R|K }&yD~ rRG{ z r } (} op £ p z r } j|R|Gp y oq R z&}EyD~ rRG{ z r } ¡op z&}& x p ~ rR"{ z rG{"o x?y j xGz zI}&yM~ r¡p ~ rRG{ z r"{4"o x?y j xGz "y p&o"r }(~ D & ¦ & D & ¦ & D " ¦ "O zE} {r(|R|K }&yD~ rRG{ z r } op z&}& x MI|R|Gp y o4q R }& p"4Go } op ~xj"y zxE}Ey y(} ~ p z 4pG{ y R } 4 Rp"r }y {(p } 0.2. Asignacin y paso por valor de objetos como argumentos }Kx o }& p""r } z&}&yD~ r¢p ~ rRG{ z rG{4&o x?y xGz E ¦ D & E ¦ D & & ¦ D " z&} {Rr(|R|MI p"4Go } op ~ xjGy z xE}&y j|R|Gp y o4q xy r ~ {&D 4p"r"{ y E§ E§ & R ~&}¡ (} q } ~ p{r x q x pq z&}&yM~ rRG{ z r } oRp z&}E x }Kx o £ q } Ap ~ rGG{ z rG{REo x?y ? xGz ¡ zE} {r(|R|K (q¡ z &("p ~ r4 £ { yDzRxE}&y ~ pqRqGjM"4qop ~ rRG{ z r } I|R|"p y oqW zE} {r(|R|" ¦A~ {&M |"|Gp y oqW R ~&}¡ (} 4p £ p"4p yDzRx O y4} ~ p¢{r x q x yDx?y { y zE}&yD~ rR"{ z r } }Kx o £ &4p £ p&4p yDzx Ap ~ rG"{ z rG{R&o x y j x"z zE} {r(|R|K (q¡ z &("p ~ r4 £ { yDzRxE}& y ~ pqRqGjM"4qop ~ rGG{ z r } I|R|Gp y o4q zE} {r(|R|" ¦A~ {&M |"|Gp y oqW x?y r¡D xy G ~ pqRqGjMq zE}&yD~ rR"{ z r } "Rr x oRpp y r4p" }(~ G q zE}&yD~ rR"{ z r } (} op £ p z r } p ~ rRG{ z rG{4&o x?y xGz O 9 G ~ pqRqGjMq }E p"4Go } op ~xj"y zxE}Ey O G ~ p¢{r x q x pq ~E} 4} q } (} q } r4 y r } ~ p G qRqGjMq z&}&yD~ rGG{ z r } op z&}& x £ q } $ G ¤ { xly4} £ &4p £ p&4p yDzx $ zE} {r(|R|K ~ pqGqGp q £ x?y Rq ~ pop ~ rGG{4p y q }(~ o }(~} ( Rp&r }(~¤ {4p ¤ {4pGo y j|R|Gp y oq !$:;'=(-;"C&-AE<6<`54'!$:;-A[=M&-=KEG:/&)1)+>)16!;#1C"54#1'G:;'&k }&yD~ rRG{ z r } "Rr x opp y r4p& }(~ }&yD~ rRG{ z r } 4} oRp £ p z r } p"4Go } op ~xjGy zxE}&y }EyD~ rRG{ z r } ¢op zE}& x (q z E("p ~ r £ { yDzxE}Ey ~ pqRqGjD&4qop ~ rGG{ z r } 4p ~ rRG{ z r } (q z E("p ~ r £ { yDzxE}Ey ~ p qGqGjD"qop ~ rR"{ z r } ~ pqRqGp q £ x?y qW ~ poRp ~ rRG{R4p y q }(~ o }(~¢} ( Rp"r }(~¤ {(p ¤ {(p"o y 4p ~ rRG{ z r } 4p ~ rRG{ z r }