<#3#>1<#3#>Das
<#737#><#619#><#4#>T<#4#> <#5#><#5#> <#6#>Class Example<#6#> <#7#>x<#7#><#619#><#737#>
<#8#>class<#8#> T {<#620#><#11#>Class T as an T.<#11#><#620#>
<#12#>public<#12#>:<#621#><#13#><#13#><#621#>
T(<#14#>const<#14#> <#15#>int<#15#> #math30##tex2html_wrap_inline1028#| i);<#765#><#738#>introduces a variable <#622#>1
<#19#>˜<#19#>
<#20#>Mvar<#20#><#622#> of type <#623#><#21#>˜<#21#>
<#22#>Mname<#22#><#623#>.<#738#><#765#><#624#><#23#>2 4.5 <#23#><#624#><#739#><#625#>2
<#24#>Creation/Deletion<#24#><#625#><#739#>
<#25#>void<#25#> *<#29#>operator<#29#> <#30#>new<#30#>(<#31#>int<#31#> <#32#>size_t<#32#>);<#626#><#33#>New.<#33#><#626#>
<#34#>void<#34#> <#35#>operator<#35#> <#36#>delete<#36#>(<#37#>void<#37#> *);<#627#><#41#>Delete.<#41#><#627#><#628#><#42#>3
Arithmetic Operators<#42#><#628#>
T #math31#operator+(T ||y);<#629#><#47#>Addition.<#47#><#629#>
<#48#>friend<#48#> T #math32#operator+(T ||x,#tex2html_wrap_inline1034#9T ||y);<#630#><#55#>
Addition as friend.<#55#><#630#>
T #math33#operator-(T ||y);<#631#><#60#>Subtraction.<#60#><#631#>
<#61#>friend<#61#> T #math34#operator-(T ||x,#tex2html_wrap_inline1038#9T ||y);<#632#><#68#>
Subtraction as friend.<#68#><#632#>
T #math35#operator*(T ||y);<#633#><#72#>Multiplication.<#72#><#633#>
<#73#>friend<#73#> T #math36#operator*(T ||x,#tex2html_wrap_inline1042#9T ||y);<#634#><#79#>
Multiplication as friend.<#79#><#634#>
T #math37#operator/(T ||y);<#635#><#84#>Division.<#84#><#635#>
<#85#>friend<#85#> T #math38#operator/(T ||x,#tex2html_wrap_inline1046#9T ||y);<#636#><#92#>
Division as friend.<#92#><#636#>
T #math39#operator#tex2html_wrap_inline1048#(T ||y);<#637#><#97#>Bitwise exclusive OR.<#97#><#637#>
<#98#>friend<#98#> T #math40#operator#tex2html_wrap_inline1050#(T ||x,#tex2html_wrap_inline1052#9T ||y);<#638#><#105#>4
Bitwise exclusive OR as friend.<#105#><#638#>
T #math41#operator#tex2html_wrap_inline1054#(T ||y);<#639#><#110#>MOD.<#110#><#639#>
<#111#>friend<#111#> T #math42#operator#tex2html_wrap_inline1056#(T ||x,#tex2html_wrap_inline1058#9T ||y);<#640#><#118#>5
MOD as friend.<#118#><#640#>
T #math43#operator+( );<#641#><#123#>Positive.<#123#><#641#>
<#124#>friend<#124#> T #math44#operator+(T ||x);<#642#><#129#>Positive as
friend.<#129#><#642#>
T #math45#operator-( );<#643#><#134#>Negative.<#134#><#643#>
<#135#>friend<#135#> T #math46#operator-(T ||x);<#644#><#140#>Negative as
friend.<#140#><#644#><#740#><#645#><#141#>Bitwise Operators<#141#><#645#><#740#>
T #math47#operator#tex2html_wrap_inline1064#(T ||y);<#646#><#145#>Bitwise AND.<#145#><#646#>
<#146#>friend<#146#> T #math48#operator#tex2html_wrap_inline1066#(T ||x,#tex2html_wrap_inline1068#9T ||y);<#647#><#152#>
Bitwise AND as friend.<#152#><#647#>
T #math49#operator#tex2html_wrap_inline1070#(T ||y);<#648#><#157#>Bitwise OR.<#157#><#648#>
<#158#>friend<#158#> T #math50#operator#tex2html_wrap_inline1072#(T ||x,#tex2html_wrap_inline1074#9T ||y);<#649#><#165#>6
Bitwise OR as friend.<#165#><#649#>
T #math51#operator#tex2html_wrap_inline1076#( );<#650#><#170#>Bitwise Complement.<#170#><#650#>
<#171#>friend<#171#> T #math52#operator#tex2html_wrap_inline1078#(T ||x);<#651#><#176#>Bitwise
Complement as friend.<#176#><#651#><#741#><#652#><#177#>Boolean Operators<#177#><#652#><#741#>
T #math53#operator#tex2html_wrap_inline1080#( );<#653#><#182#>NOT.<#182#><#653#>
<#183#>friend<#183#> T #math54#operator#tex2html_wrap_inline1082#(T ||x);<#654#><#188#>NOT as friend.<#188#><#654#>
#math55#
booloperator#tex2html_wrap_inline1084#(T ||y);<#655#><#194#>AND.<#194#><#655#>
<#195#>friend<#195#>
<#196#>bool<#196#>#math56#operator#tex2html_wrap_inline1086#(T ||x,#tex2html_wrap_inline1088#9T ||y);<#656#><#203#>7
AND as friend.<#203#><#656#>
#math57#
booloperator#tex2html_wrap_inline1090#(T ||y);<#657#><#209#>OR.<#209#><#657#>
<#210#>friend<#210#>
<#211#>bool<#211#>#math58#operator#tex2html_wrap_inline1092#(T ||x,#tex2html_wrap_inline1094#9T ||y);<#658#><#218#>8
OR as friend.<#218#><#658#><#742#><#659#><#219#>Assignment Operators<#219#> <#659#><#742#>
T #math59#operator#tex2html_wrap_inline1096#(T ||y);<#660#><#224#>Assignment.<#224#><#660#>
T #math60##tex2html_wrap_inline1098#operator#tex2html_wrap_inline1099#+#tex2html_wrap_inline1100#(T ||y);<#662#><#230#>Add and
assign.<#230#><#662#>
<#231#>friend<#231#> T #math61#operator#tex2html_wrap_inline1102#+#tex2html_wrap_inline1103#(T ||x,#tex2html_wrap_inline1105#9T ||y);<#664#><#238#>9
Add and assign as friend.<#238#><#664#>
T #math62#operator#tex2html_wrap_inline1107##tex2html_wrap_inline1108##tex2html_wrap_inline1109#(T ||y);<#666#><#244#>modulo and
assign.<#244#><#666#>
<#245#>friend<#245#> T #math63#operator#tex2html_wrap_inline1111##tex2html_wrap_inline1112##tex2html_wrap_inline1113#(T ||x,#tex2html_wrap_inline1115#9T ||y);10
<#668#><#253#>modulo and assign as friend.<#253#><#668#>
T #math64##tex2html_wrap_inline1117#operator#tex2html_wrap_inline1118##tex2html_wrap_inline1119##tex2html_wrap_inline1120#(T ||y);<#670#><#260#>exclusive
OR and assign.<#260#><#670#>
<#261#>friend<#261#> T #math65#operator#tex2html_wrap_inline1122##tex2html_wrap_inline1123##tex2html_wrap_inline1124#(T ||x,#tex2html_wrap_inline1126#9T ||y);11
<#672#><#269#>exclusive OR and assign as friend.<#269#><#672#>
T #math66##tex2html_wrap_inline1128#operator#tex2html_wrap_inline1129#-#tex2html_wrap_inline1130#(T ||y);<#674#><#275#>Substract and
assign.<#275#><#674#>
<#276#>friend<#276#> T #math67##tex2html_wrap_inline1132#operator#tex2html_wrap_inline1133#-#tex2html_wrap_inline1134#(T ||x,