<#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,#tex2html_wrap_inline1136#9T ||y);12 <#676#><#284#>Substract and assign as friend.<#284#><#676#> T #math68##tex2html_wrap_inline1138#operator#tex2html_wrap_inline1139##tex2html_wrap_inline1140##tex2html_wrap_inline1141#(T ||y);<#678#><#291#>OR and assign.<#291#><#678#> <#292#>friend<#292#> T #math69##tex2html_wrap_inline1143#operator#tex2html_wrap_inline1144##tex2html_wrap_inline1145##tex2html_wrap_inline1146#(T ||x,#tex2html_wrap_inline1148#9T 13 ||y);<#680#><#301#>OR and assign as friend.<#301#><#680#> T #math70##tex2html_wrap_inline1150#operator#tex2html_wrap_inline1151##tex2html_wrap_inline1152##tex2html_wrap_inline1153#(<#308#>int<#308#> ||k);<#682#><#309#>Shift right and assign.<#309#><#682#> <#310#>friend<#310#> T #math71##tex2html_wrap_inline1155#operator#tex2html_wrap_inline1156##tex2html_wrap_inline1157##tex2html_wrap_inline1158#(T ||x,#tex2html_wrap_inline1160#9T 14 ||y);<#684#><#319#>Shift right and assign as friend.<#319#><#684#> T #math72##tex2html_wrap_inline1162#operator#tex2html_wrap_inline1163##tex2html_wrap_inline1164##tex2html_wrap_inline1165#(<#326#>int<#326#> ||k);<#686#><#327#>Shift left and assign.<#327#><#686#> <#328#>friend<#328#> T #math73##tex2html_wrap_inline1167#operator#tex2html_wrap_inline1168##tex2html_wrap_inline1169##tex2html_wrap_inline1170#(T ||x,#tex2html_wrap_inline1172#9T 15 ||y);<#688#><#337#>Shift left and assign as friend.<#337#><#688#> T #math74##tex2html_wrap_inline1174#operator*#tex2html_wrap_inline1175#(T ||y);<#689#><#342#>Multiply and assign.<#342#><#689#> <#343#>friend<#343#> T #math75##tex2html_wrap_inline1177#operator*#tex2html_wrap_inline1178#(T ||x,#tex2html_wrap_inline1180#9T ||y);<#690#><#350#>16 Multiply and assign as friend.<#350#><#690#> T #math76##tex2html_wrap_inline1182#operator#tex2html_wrap_inline1183#/#tex2html_wrap_inline1184#(T ||y);<#692#><#357#>Divide and assign.<#357#><#692#> <#358#>friend<#358#> T #math77##tex2html_wrap_inline1186#operator#tex2html_wrap_inline1187#/#tex2html_wrap_inline1188#(T ||x,#tex2html_wrap_inline1190#9T 17 ||y);<#694#><#367#>Divide and assign as friend.<#367#><#694#> T #math78##tex2html_wrap_inline1192#operator#tex2html_wrap_inline1193##tex2html_wrap_inline1194#(T ||y);<#695#><#372#>And and assign.<#372#><#695#> <#373#>friend<#373#> T #math79##tex2html_wrap_inline1196#operator#tex2html_wrap_inline1197##tex2html_wrap_inline1198#(T ||x,#tex2html_wrap_inline1200#9T ||y);<#696#><#380#>18 And and assign as friend.<#380#><#696#><#759#><#697#><#381#>Array and Function Call Operator<#381#> <#697#><#759#> T #math80##tex2html_wrap_inline1202#<#385#>operator<#385#> [;SPMnbsp;](<#386#>int<#386#> ||i);<#698#><#387#>returns a reference to the contents of i.<#387#><#698#> T <#388#>operator<#388#> (;SPMnbsp;)(<#389#>int<#389#> ||i);<#699#><#390#>returns the T at position i.<#390#><#699#>19 <#700#><#391#>I/O-Operators<#391#><#700#> <#392#>friend<#392#>
<#393#>ostream<#393#>#math81##tex2html_wrap_inline1204#operator#tex2html_wrap_inline1205#(
ostream#tex2html_wrap_inline1206#| O,#tex2html_wrap_inline1207#920 <#400#>const<#400#> T #math82##tex2html_wrap_inline1209#| e);<#760#><#701#>writes T <#404#>||e<#404#> to the output stream <#405#>||O<#405#>. <#701#><#760#> <#406#>friend<#406#>
<#407#>istream<#407#>#math83##tex2html_wrap_inline1211#operator#tex2html_wrap_inline1212#(
istream#tex2html_wrap_inline1213#| I,#tex2html_wrap_inline1214#9T #math84##tex2html_wrap_inline1216#| e);<#761#><#702#>reads <#417#>||e<#417#> from input stream <#418#>21 ||I<#418#>.<#702#><#761#><#703#><#419#>Comparison Operators<#419#><#703#> #math85#
booloperator#tex2html_wrap_inline1218#(T ||y);<#704#><#425#>Lower Equal.<#425#><#704#> <#426#>friend<#426#>
<#427#>bool<#427#>#math86#operator#tex2html_wrap_inline1220#(T ||x,#tex2html_wrap_inline1222#9T ||y);<#705#><#434#>22 Lower Equal as friend.<#434#><#705#> #math87#
booloperator#tex2html_wrap_inline1224#(T ||y);<#706#><#440#>Greater Equal.<#440#><#706#> <#441#>friend<#441#>
<#442#>bool<#442#>#math88#operator#tex2html_wrap_inline1226#(T ||x,#tex2html_wrap_inline1228#9T ||y);<#707#><#449#>23 Greater Equal as friend.<#449#><#707#> #math89#
booloperator ;SPMlt;(T ||y);<#708#><#454#>Lower.<#454#><#708#> <#455#>friend<#455#>
<#456#>bool<#456#><#457#>operator<#457#>;SPMlt;(T ||x,#tex2html_wrap_inline1232#9T ||y);<#709#><#462#>24 Lower as friend.<#462#><#709#> #math90#
booloperator ;SPMgt;(T ||y);<#710#><#467#>Greater.<#467#><#710#> <#468#>friend<#468#>
<#469#>bool<#469#><#470#>operator<#470#>;SPMgt;(T ||x,#tex2html_wrap_inline1236#9T ||y);<#711#><#475#>25 Greater as friend.<#475#><#711#> #math91#
booloperator#tex2html_wrap_inline1238#(T ||y);<#712#><#481#>Inequality.<#481#><#712#> <#482#>friend<#482#>
<#483#>bool<#483#>#math92#operator#tex2html_wrap_inline1240#(T ||x,#tex2html_wrap_inline1242#9T ||y);<#713#><#490#>26 Inequality as friend.<#490#><#713#> #math93#
booloperator#tex2html_wrap_inline1244#(T ||y);<#714#><#496#>Equality.<#496#><#714#> <#497#>friend<#497#>
<#498#>bool<#498#>#math94#operator#tex2html_wrap_inline1246#(T ||x,#tex2html_wrap_inline1248#9T ||y);<#715#><#505#>27 Equality as friend.<#505#><#715#><#762#><#716#><#506#>Increment and Decrement<#506#><#716#><#762#> T #math95#operator#tex2html_wrap_inline1250#( );<#717#><#511#>Increment Prefix.<#511#><#717#> <#512#>friend<#512#> T #math96#operator#tex2html_wrap_inline1252#(T ||x);<#718#><#517#>Increment Prefix as friend function.<#517#><#718#> T #math97#operator#tex2html_wrap_inline1254#(int);<#719#><#523#>Increment Suffix.<#523#><#719#> <#524#>friend<#524#> T #math98#operator#tex2html_wrap_inline1256#(T ||x#math99#,#tex2html_wrap_inline1258#9int);<#720#><#532#> Increment Suffix as friend function.<#532#><#720#> T #math100#operator#tex2html_wrap_inline1260#( );<#721#><#537#>Decrement Prefix.<#537#><#721#> <#538#>friend<#538#> T #math101#operator#tex2html_wrap_inline1262#(T ||x);<#722#><#543#>Decrement Prefix as friend function.<#543#><#722#> T #math102#operator#tex2html_wrap_inline1264#(int);<#723#><#549#>Decrement Suffix.<#549#><#723#> <#550#>friend<#550#> T #math103#operator#tex2html_wrap_inline1266#(T ||x#math104#,#tex2html_wrap_inline1268#9int);<#724#><#558#> Decrement Suffix as friend function.<#558#><#724#><#763#><#725#><#559#>Adressing<#559#><#725#><#763#> T #math105#operator* (;SPMnbsp;);<#726#><#563#>Dereference.<#563#><#726#> <#564#>friend<#564#> T #math106#operator*(T ||x);<#727#><#568#>Dereference as friend.<#568#><#727#> T #math107#operator#tex2html_wrap_inline1272# (;SPMnbsp;);<#728#><#572#>Address.<#572#><#728#> <#573#>friend<#573#> T #math108#operator#tex2html_wrap_inline1274#(T ||x);<#729#><#577#>Address as friend.<#577#><#729#> T #math109#operator#tex2html_wrap_inline1276#( );<#730#><#582#>Pointer to. Also called dereference. DAs ist Suffix<#582#><#730#> T #math110#*operator#tex2html_wrap_inline1278#(<#588#>int<#588#> ||y);<#731#><#589#>Pointer to member.<#589#><#731#> <#590#>friend<#590#> T #math111#operator#tex2html_wrap_inline1280#(T ||x,#tex2html_wrap_inline1282#9<#597#>int<#597#> ||y);<#732#><#598#>28 Pointer to member as friend.<#598#><#732#><#764#><#733#><#599#>Sonstiges<#599#><#733#><#764#> <#600#>void<#600#> <#601#>operator<#601#>, (<#604#>int<#604#> ||y);<#734#><#605#>Tuple.<#605#><#734#> <#606#>friend<#606#> T <#607#>operator<#607#>, (T ||x,#tex2html_wrap_inline1286#9<#612#>int<#612#> ||y);<#735#><#613#>29 Tuple as friend.<#613#><#735#> };<#736#><#616#>bla bla<#616#><#736#>

<#617#>2<#617#>