锘??xml version="1.0" encoding="utf-8" standalone="yes"?>久久久久亚洲精品男人的天堂,久久精品国产亚洲av麻豆色欲,久久夜色精品国产噜噜噜亚洲AVhttp://www.shnenglu.com/wlwlxj/category/1324.html<div>涓涓悆杞キ鐨勭敺浜?!!!!鎴戝彧鎯沖啓紼嬪簭####<br>甯堝し涔嬫妧浠ュ埗澶? 鍚懼皾緇堟棩鑰屾濈煟,涓嶅欏昏嚲涔嬫墍瀛︿篃<br>鍠濈瀛熷﹩姹?韙忚繃濂堜綍妗?娑呮</div> I've been programming since I was 21. Started with C++, looked at Java, keen on Visual Basic and Visual C++, thinking about .NET and C#.^_^,very ridiculous.zh-cnTue, 20 May 2008 09:27:26 GMTTue, 20 May 2008 09:27:26 GMT60鍔ㄦ佸鎬佷笌闈欐佸鎬?/title><link>http://www.shnenglu.com/wlwlxj/archive/2006/09/25/12936.html</link><dc:creator>涓囪繛鏂?/dc:creator><author>涓囪繛鏂?/author><pubDate>Mon, 25 Sep 2006 02:38:00 GMT</pubDate><guid>http://www.shnenglu.com/wlwlxj/archive/2006/09/25/12936.html</guid><wfw:comment>http://www.shnenglu.com/wlwlxj/comments/12936.html</wfw:comment><comments>http://www.shnenglu.com/wlwlxj/archive/2006/09/25/12936.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.shnenglu.com/wlwlxj/comments/commentRss/12936.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/wlwlxj/services/trackbacks/12936.html</trackback:ping><description><![CDATA[鍔ㄦ佸鎬侀氳繃緇ф壙+铏氬嚱鏁板疄鐜幫紝闈欐佸鎬侀氳繃妯$増瀹炵幇銆?br />鍔ㄦ佸鎬佺湅涓婂幓寰堣嚜鐒舵竻鏅幫紝闄ゆ涔嬪鎬曟槸娌℃湁鍒殑濂藉銆傝繖涔熸槸涓轟粈涔坰tl銆乥oost涓轟竴緹よ娉曢珮鎵嬫墍浜茬湳鐨勫師鍥犮傝瀹炶瘽緇忓父涓鐪嬪埌妯$増閮芥墦鍐鋒垬錛岃鏄ā鐗堝弬鏁頒竴澶氾紝鐞嗘竻涔嬮棿鍏崇郴灝卞緱鍖栧緢澶氭椂闂淬備笉榪囨煇浜涘湴鏂癸紝浣跨敤妯$増鏉ュ疄鐜頒竴浜涘簳灞傚姛鑳借兘杈懼埌鎰忔兂涓嶅埌鐨勬晥鏋溿?br />闈欐佸鎬佺殑濂藉錛?br />1銆佸彲浠ュ鎬佹垚鍛樺彉閲?鑷垱鐨勮娉曞摝^_^)<br />2銆侀伩鍏嶈櫄鎸囬拡鐨勫唴瀛樻崯鑰椾互鍙婅櫄鍑芥暟璋冪敤榪愯鏁堢巼鎹熻?br />緙虹偣錛?br />1銆佸洜涓虹紪璇戞椂浼氬姞鍏ョ被鍨嬬殑紜畾錛屼唬鐮佸昂瀵鎬細紼嶇◢澶т竴鐐?br />2銆佹棤娉曞澶氭佸璞$粺涓澶勭悊錛屽鎬佹х◢鏈夋姌鎵?br /><br />MFC綾誨緢灝戜嬌鐢ㄦā鐗堬紝鑰學TL綾誨ぇ閲忎嬌鐢ㄦā鐗堛傛垜鍦ㄧ湅WTL浠g爜鐨勬椂鍊欙紝緇忓父琚噷闈㈢殑瀹炵幇鎵榪鋒儜錛屽洜涓洪噷闈㈡湁寰堝璁捐閲囩敤鍔ㄦ佸鎬佸拰闈欐佸鎬佺粨鍚堜嬌鐢紝榪欏彲鑳芥槸涓縐嶄笉閿欑殑緇撳悎銆備笅闈㈡垜鐢ㄤ竴孌典唬鐮佹紨紺鴻繖浜涚壒鐐癸紝鐪嬩笂鍘誨緢騫沖父錛?br /><div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /><span style="COLOR: #008000">//</span><span style="COLOR: #008000">聽Virtual聽&&聽inherit</span><span style="COLOR: #008000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #0000ff">class</span><span style="COLOR: #000000">聽Category1<br /><img id="Codehighlighter1_38_80_Open_Image" onclick="this.style.display='none'; Codehighlighter1_38_80_Open_Text.style.display='none'; Codehighlighter1_38_80_Closed_Image.style.display='inline'; Codehighlighter1_38_80_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_38_80_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_38_80_Closed_Text.style.display='none'; Codehighlighter1_38_80_Open_Image.style.display='inline'; Codehighlighter1_38_80_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span><span id="Codehighlighter1_38_80_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/images/dot.gif" /></span><span id="Codehighlighter1_38_80_Open_Text"><span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000">:<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span><span style="COLOR: #0000ff">virtual</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000">聽SayCatName()聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span><span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #0000ff">class</span><span style="COLOR: #000000">聽Car1聽:聽</span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000">聽Category1<br /><img id="Codehighlighter1_114_221_Open_Image" onclick="this.style.display='none'; Codehighlighter1_114_221_Open_Text.style.display='none'; Codehighlighter1_114_221_Closed_Image.style.display='inline'; Codehighlighter1_114_221_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_114_221_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_114_221_Closed_Text.style.display='none'; Codehighlighter1_114_221_Open_Image.style.display='inline'; Codehighlighter1_114_221_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span><span id="Codehighlighter1_114_221_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/images/dot.gif" /></span><span id="Codehighlighter1_114_221_Open_Text"><span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="COLOR: #0000ff">private</span><span style="COLOR: #000000">:<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span><span style="COLOR: #0000ff">static</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">聽聽聽聽m_strName;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000">:<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span><span style="COLOR: #0000ff">virtual</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000">聽SayCatName()<br /><img id="Codehighlighter1_187_219_Open_Image" onclick="this.style.display='none'; Codehighlighter1_187_219_Open_Text.style.display='none'; Codehighlighter1_187_219_Closed_Image.style.display='inline'; Codehighlighter1_187_219_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_187_219_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_187_219_Closed_Text.style.display='none'; Codehighlighter1_187_219_Open_Image.style.display='inline'; Codehighlighter1_187_219_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />聽聽聽聽</span><span id="Codehighlighter1_187_219_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/images/dot.gif" /></span><span id="Codehighlighter1_187_219_Open_Text"><span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽cout聽</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">聽m_strName聽</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">聽endl;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />聽聽聽聽}</span></span><span style="COLOR: #000000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span><span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">聽Car1::m_strName聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Car1</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #0000ff">class</span><span style="COLOR: #000000">聽House1聽:聽</span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000">聽Category1<br /><img id="Codehighlighter1_290_397_Open_Image" onclick="this.style.display='none'; Codehighlighter1_290_397_Open_Text.style.display='none'; Codehighlighter1_290_397_Closed_Image.style.display='inline'; Codehighlighter1_290_397_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_290_397_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_290_397_Closed_Text.style.display='none'; Codehighlighter1_290_397_Open_Image.style.display='inline'; Codehighlighter1_290_397_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span><span id="Codehighlighter1_290_397_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/images/dot.gif" /></span><span id="Codehighlighter1_290_397_Open_Text"><span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="COLOR: #0000ff">private</span><span style="COLOR: #000000">:<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span><span style="COLOR: #0000ff">static</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">聽聽聽聽m_strName;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000">:<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span><span style="COLOR: #0000ff">virtual</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000">聽SayCatName()<br /><img id="Codehighlighter1_363_395_Open_Image" onclick="this.style.display='none'; Codehighlighter1_363_395_Open_Text.style.display='none'; Codehighlighter1_363_395_Closed_Image.style.display='inline'; Codehighlighter1_363_395_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_363_395_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_363_395_Closed_Text.style.display='none'; Codehighlighter1_363_395_Open_Image.style.display='inline'; Codehighlighter1_363_395_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />聽聽聽聽</span><span id="Codehighlighter1_363_395_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/images/dot.gif" /></span><span id="Codehighlighter1_363_395_Open_Text"><span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽cout聽</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">聽m_strName聽</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">聽endl;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />聽聽聽聽}</span></span><span style="COLOR: #000000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span><span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">聽House1::m_strName聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Hourse1</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">聽!(Virtual聽&&聽inherit)<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">聽Template</span><span style="COLOR: #008000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #000000">template</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">typename聽T</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #0000ff">class</span><span style="COLOR: #000000">聽Category2<br /><img id="Codehighlighter1_513_646_Open_Image" onclick="this.style.display='none'; Codehighlighter1_513_646_Open_Text.style.display='none'; Codehighlighter1_513_646_Closed_Image.style.display='inline'; Codehighlighter1_513_646_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_513_646_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_513_646_Closed_Text.style.display='none'; Codehighlighter1_513_646_Open_Image.style.display='inline'; Codehighlighter1_513_646_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span><span id="Codehighlighter1_513_646_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/images/dot.gif" /></span><span id="Codehighlighter1_513_646_Open_Text"><span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="COLOR: #0000ff">protected</span><span style="COLOR: #000000">:<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span><span style="COLOR: #0000ff">static</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">聽m_strName;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000">:<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span><span style="COLOR: #0000ff">virtual</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000">聽SayCatName()<br /><img id="Codehighlighter1_588_644_Open_Image" onclick="this.style.display='none'; Codehighlighter1_588_644_Open_Text.style.display='none'; Codehighlighter1_588_644_Closed_Image.style.display='inline'; Codehighlighter1_588_644_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_588_644_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_588_644_Closed_Text.style.display='none'; Codehighlighter1_588_644_Open_Image.style.display='inline'; Codehighlighter1_588_644_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />聽聽聽聽</span><span id="Codehighlighter1_588_644_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/images/dot.gif" /></span><span id="Codehighlighter1_588_644_Open_Text"><span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽T</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">聽聽聽聽pT聽聽聽聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽static_cast</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">T</span><span style="COLOR: #000000">*></span><span style="COLOR: #000000">(</span><span style="COLOR: #0000ff">this</span><span style="COLOR: #000000">);<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽pT</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">SayCatName();<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />聽聽聽聽}</span></span><span style="COLOR: #000000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span><span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #0000ff">class</span><span style="COLOR: #000000">聽Car2聽:聽</span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000">聽Category2</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">Car2</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br /><img id="Codehighlighter1_686_758_Open_Image" onclick="this.style.display='none'; Codehighlighter1_686_758_Open_Text.style.display='none'; Codehighlighter1_686_758_Closed_Image.style.display='inline'; Codehighlighter1_686_758_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_686_758_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_686_758_Closed_Text.style.display='none'; Codehighlighter1_686_758_Open_Image.style.display='inline'; Codehighlighter1_686_758_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span><span id="Codehighlighter1_686_758_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/images/dot.gif" /></span><span id="Codehighlighter1_686_758_Open_Text"><span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000">:<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span><span style="COLOR: #0000ff">virtual</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000">聽SayCatName()<br /><img id="Codehighlighter1_724_756_Open_Image" onclick="this.style.display='none'; Codehighlighter1_724_756_Open_Text.style.display='none'; Codehighlighter1_724_756_Closed_Image.style.display='inline'; Codehighlighter1_724_756_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_724_756_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_724_756_Closed_Text.style.display='none'; Codehighlighter1_724_756_Open_Image.style.display='inline'; Codehighlighter1_724_756_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />聽聽聽聽</span><span id="Codehighlighter1_724_756_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/images/dot.gif" /></span><span id="Codehighlighter1_724_756_Open_Text"><span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽cout聽</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">聽m_strName聽</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">聽endl;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />聽聽聽聽}</span></span><span style="COLOR: #000000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span><span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">聽Car2::m_strName聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Car2</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #0000ff">class</span><span style="COLOR: #000000">聽House2聽:聽</span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000">聽Category2</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">House2</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br /><img id="Codehighlighter1_835_907_Open_Image" onclick="this.style.display='none'; Codehighlighter1_835_907_Open_Text.style.display='none'; Codehighlighter1_835_907_Closed_Image.style.display='inline'; Codehighlighter1_835_907_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_835_907_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_835_907_Closed_Text.style.display='none'; Codehighlighter1_835_907_Open_Image.style.display='inline'; Codehighlighter1_835_907_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span><span id="Codehighlighter1_835_907_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/images/dot.gif" /></span><span id="Codehighlighter1_835_907_Open_Text"><span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000">:<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span><span style="COLOR: #0000ff">virtual</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000">聽SayCatName()<br /><img id="Codehighlighter1_873_905_Open_Image" onclick="this.style.display='none'; Codehighlighter1_873_905_Open_Text.style.display='none'; Codehighlighter1_873_905_Closed_Image.style.display='inline'; Codehighlighter1_873_905_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_873_905_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_873_905_Closed_Text.style.display='none'; Codehighlighter1_873_905_Open_Image.style.display='inline'; Codehighlighter1_873_905_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />聽聽聽聽</span><span id="Codehighlighter1_873_905_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/images/dot.gif" /></span><span id="Codehighlighter1_873_905_Open_Text"><span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽cout聽</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">聽m_strName聽</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">聽endl;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />聽聽聽聽}</span></span><span style="COLOR: #000000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span><span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">聽House2::m_strName聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">House2</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">聽!(Template)<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">聽Virtual聽&&聽inherit聽&&聽Template</span><span style="COLOR: #008000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #0000ff">class</span><span style="COLOR: #000000">聽CategoryBase<br /><img id="Codehighlighter1_1016_1058_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1016_1058_Open_Text.style.display='none'; Codehighlighter1_1016_1058_Closed_Image.style.display='inline'; Codehighlighter1_1016_1058_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_1016_1058_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1016_1058_Closed_Text.style.display='none'; Codehighlighter1_1016_1058_Open_Image.style.display='inline'; Codehighlighter1_1016_1058_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span><span id="Codehighlighter1_1016_1058_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/images/dot.gif" /></span><span id="Codehighlighter1_1016_1058_Open_Text"><span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000">:<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span><span style="COLOR: #0000ff">virtual</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000">聽SayCatName()聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span><span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" />template</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">typename聽T,聽typename聽TBase</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">CategoryBase</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #0000ff">class</span><span style="COLOR: #000000">聽CategoryImpl聽:聽</span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000">聽TBase<br /><img id="Codehighlighter1_1146_1185_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1146_1185_Open_Text.style.display='none'; Codehighlighter1_1146_1185_Closed_Image.style.display='inline'; Codehighlighter1_1146_1185_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_1146_1185_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1146_1185_Closed_Text.style.display='none'; Codehighlighter1_1146_1185_Open_Image.style.display='inline'; Codehighlighter1_1146_1185_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span><span id="Codehighlighter1_1146_1185_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/images/dot.gif" /></span><span id="Codehighlighter1_1146_1185_Open_Text"><span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="COLOR: #0000ff">protected</span><span style="COLOR: #000000">:<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span><span style="COLOR: #0000ff">static</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">聽聽聽聽m_strName;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span><span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #0000ff">class</span><span style="COLOR: #000000">聽Car3聽:聽</span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000">聽CategoryImpl</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">Car3</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br /><img id="Codehighlighter1_1228_1300_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1228_1300_Open_Text.style.display='none'; Codehighlighter1_1228_1300_Closed_Image.style.display='inline'; Codehighlighter1_1228_1300_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_1228_1300_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1228_1300_Closed_Text.style.display='none'; Codehighlighter1_1228_1300_Open_Image.style.display='inline'; Codehighlighter1_1228_1300_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span><span id="Codehighlighter1_1228_1300_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/images/dot.gif" /></span><span id="Codehighlighter1_1228_1300_Open_Text"><span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000">:<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span><span style="COLOR: #0000ff">virtual</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000">聽SayCatName()<br /><img id="Codehighlighter1_1266_1298_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1266_1298_Open_Text.style.display='none'; Codehighlighter1_1266_1298_Closed_Image.style.display='inline'; Codehighlighter1_1266_1298_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_1266_1298_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1266_1298_Closed_Text.style.display='none'; Codehighlighter1_1266_1298_Open_Image.style.display='inline'; Codehighlighter1_1266_1298_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />聽聽聽聽</span><span id="Codehighlighter1_1266_1298_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/images/dot.gif" /></span><span id="Codehighlighter1_1266_1298_Open_Text"><span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽cout聽</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">聽m_strName聽</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">聽endl;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />聽聽聽聽}</span></span><span style="COLOR: #000000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span><span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">聽Car3::m_strName聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Car3</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #0000ff">class</span><span style="COLOR: #000000">聽House3聽:聽</span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000">聽CategoryImpl</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">House3</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br /><img id="Codehighlighter1_1380_1452_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1380_1452_Open_Text.style.display='none'; Codehighlighter1_1380_1452_Closed_Image.style.display='inline'; Codehighlighter1_1380_1452_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_1380_1452_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1380_1452_Closed_Text.style.display='none'; Codehighlighter1_1380_1452_Open_Image.style.display='inline'; Codehighlighter1_1380_1452_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span><span id="Codehighlighter1_1380_1452_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/images/dot.gif" /></span><span id="Codehighlighter1_1380_1452_Open_Text"><span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000">:<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span><span style="COLOR: #0000ff">virtual</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000">聽SayCatName()<br /><img id="Codehighlighter1_1418_1450_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1418_1450_Open_Text.style.display='none'; Codehighlighter1_1418_1450_Closed_Image.style.display='inline'; Codehighlighter1_1418_1450_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_1418_1450_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1418_1450_Closed_Text.style.display='none'; Codehighlighter1_1418_1450_Open_Image.style.display='inline'; Codehighlighter1_1418_1450_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />聽聽聽聽</span><span id="Codehighlighter1_1418_1450_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/images/dot.gif" /></span><span id="Codehighlighter1_1418_1450_Open_Text"><span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽cout聽</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">聽m_strName聽</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">聽endl;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />聽聽聽聽}</span></span><span style="COLOR: #000000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span><span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">聽House3::m_strName聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">House3</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">聽!(Virtual聽&&聽inherit聽&&聽Template)</span><span style="COLOR: #008000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #000000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000">聽_tmain(</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000">聽argc,聽_TCHAR</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">聽argv[])<br /><img id="Codehighlighter1_1567_2332_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1567_2332_Open_Text.style.display='none'; Codehighlighter1_1567_2332_Closed_Image.style.display='inline'; Codehighlighter1_1567_2332_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_1567_2332_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1567_2332_Closed_Text.style.display='none'; Codehighlighter1_1567_2332_Open_Image.style.display='inline'; Codehighlighter1_1567_2332_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span><span id="Codehighlighter1_1567_2332_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/images/dot.gif" /></span><span id="Codehighlighter1_1567_2332_Open_Text"><span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">聽test聽Virtual聽&&聽inherit</span><span style="COLOR: #008000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="COLOR: #000000">聽聽聽聽Category1</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">聽聽聽聽pCatInstance聽聽聽聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">聽Car1();<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽pCatInstance</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">SayCatName();<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽delete聽pCatInstance;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽pCatInstance聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽NULL;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽pCatInstance聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">聽House1();<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽pCatInstance</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">SayCatName();<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽delete聽pCatInstance;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽pCatInstance聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽NULL;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">聽!(test聽Virtual聽&&聽inherit)<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">聽test聽Template</span><span style="COLOR: #008000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="COLOR: #000000">聽聽聽聽Category2</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">Car2</span><span style="COLOR: #000000">>*</span><span style="COLOR: #000000">聽聽聽聽pCar2聽聽聽聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">聽Car2();<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽pCar2</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">SayCatName();<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽delete聽pCar2;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽pCar2聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽NULL;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽Category2</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">House2</span><span style="COLOR: #000000">>*</span><span style="COLOR: #000000">聽聽聽聽pHouse2聽聽聽聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">聽House2();<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽pHouse2</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">SayCatName();<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽delete聽pHouse2;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽pHouse2聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽NULL;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">聽!(test聽Template)<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">聽test聽Virtual聽&&聽inherit聽&&聽Template</span><span style="COLOR: #008000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="COLOR: #000000">聽聽聽聽CategoryBase</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">聽聽聽聽pBase聽聽聽聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">聽Car3();<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽pBase</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">SayCatName();<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽delete聽pBase;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽pBase聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽NULL;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽pBase聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">聽House3();<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽pBase</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">SayCatName();<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽delete聽pBase;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽pBase聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽NULL;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">聽!(test聽Virtual聽&&聽inherit聽&&聽Template)</span><span style="COLOR: #008000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="COLOR: #000000">聽聽聽聽</span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span></div>閲岄潰浣撶幇浜嗗緢澶氱壒鎬э紝鏈変簺渚嬪闈欐佸嚱鏁扮殑宸у浣跨敤娌℃湁婕旂ず銆?br /><br />渚嬪瓙瀹屽叏鏄湰浜鴻噯鎯沖嚭鏉ョ殑錛屾病鏈夊疄闄呮剰涔夛紝浠呬粠璇硶涓婂幓鑰冭檻銆?img src ="http://www.shnenglu.com/wlwlxj/aggbug/12936.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/wlwlxj/" target="_blank">涓囪繛鏂?/a> 2006-09-25 10:38 <a href="http://www.shnenglu.com/wlwlxj/archive/2006/09/25/12936.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>std::string涓涓瀬鍏墮殣鏅﹀緱闂http://www.shnenglu.com/wlwlxj/archive/2006/04/18/5819.html涓囪繛鏂?/dc:creator>涓囪繛鏂?/author>Tue, 18 Apr 2006 08:23:00 GMThttp://www.shnenglu.com/wlwlxj/archive/2006/04/18/5819.htmlhttp://www.shnenglu.com/wlwlxj/comments/5819.htmlhttp://www.shnenglu.com/wlwlxj/archive/2006/04/18/5819.html#Feedback7http://www.shnenglu.com/wlwlxj/comments/commentRss/5819.htmlhttp://www.shnenglu.com/wlwlxj/services/trackbacks/5819.html鏄ㄥぉ鍋氫竴涓猟ll錛屼唬鐮佸緢蹇啓瀹屼簡錛岀劧鑰屼嬌鐢ㄥ緱鏃跺欐繪槸閬囧埌string鍐呴儴鎸囬拡鍒犻櫎閿欒錛岄儊闂蜂簡涓澶╋紝浠婂ぉ娌″幓鍏徃錛屽ソ濂界爺絀朵簡涓涓嬨?br />棣栧厛鐪嬩笅涓嬮潰榪欐浠g爜錛屽0鏄庝袱涓猻tring瀵硅薄錛?br />

std:: string 聽聽s1聽 = " wlwlxj " ;
std::
string 聽聽s2聽 = " lxjwlwww " ;

璋冭瘯鐘舵佷笅鍙互鐪嬪埌鍐呴儴鎸囬拡錛?br />s1=0x00364ff9
s2=0x00365061
鐒跺悗鎵ц

s2聽 = 聽s1;

鎸変笅f11錛岃繘鍏string婧愭枃浠訛細

_Myt & operator = ( const 聽_Myt & 聽_X)聽聽聽聽聽聽聽聽聽// 璧嬪兼搷浣滅
聽聽
{ return 聽(assign(_X));聽}聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽// 璋冪敤assign鍑芥暟

緇х畫榪涘叆assign(_X)鍑芥暟錛?/p>

_Myt & 聽assign( const 聽_Myt & 聽_X)
聽聽聽聽聽聽聽聽
{ return 聽(assign(_X,聽 0 ,聽npos));聽}聽聽聽// 璋冪敤assign鍑芥暟
緇х畫榪涘叆assign鍑芥暟錛屽ソ鎴忛兘鍦ㄨ繖閲岄潰錛?br />
_Myt&聽assign(const聽_Myt&聽_X,聽size_type聽_P,聽size_type聽_M)
聽聽聽聽聽聽聽聽
{if聽(_X.size()聽<聽_P)
聽聽聽聽聽聽聽聽聽聽聽聽_Xran();
聽聽聽聽聽聽聽聽size_type聽_N聽
=聽_X.size()聽-聽_P;
聽聽聽聽聽聽聽聽
if聽(_M聽<聽_N)
聽聽聽聽聽聽聽聽聽聽聽聽_N聽
=聽_M;
聽聽聽聽聽聽聽聽
if聽(this==&_X)
聽聽聽聽聽聽聽聽聽聽聽聽erase((size_type)(_P聽
+聽_N)),聽erase(0,聽_P);
聽聽聽聽聽聽聽聽
elseif聽(0<聽_N聽&&聽_N聽==聽_X.size()聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽// 榪欎釜鍒嗘敮鎰忔濆氨鏄鏋滄嫹璐濇簮鏈夊唴瀹逛笖灝辨槸灝辨槸婧愭湰韜紝騫朵笖
聽聽聽聽聽聽聽聽聽聽聽聽
&&聽_Refcnt(_X.c_str())聽<聽_FROZEN聽-1聽聽聽聽聽聽聽聽聽聽// 婧愬瓧絎︿覆寮曠敤嬈℃暟灝戜簬255-1嬈★紙鍙寮曠敤嬈℃暟鏈澶?55嬈★級錛?/span>
聽聽聽聽聽聽聽聽聽聽聽聽
&&聽allocator聽==聽_X.allocator)聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽//涓旀簮瀛楃鍜岀洰鐨勫瓧絎﹀垎閰嶅櫒涓鑷?br />聽聽聽聽聽聽聽聽聽聽聽聽{_Tidy(true);聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽// 鍒犻櫎鏈韓
聽聽聽聽聽聽聽聽聽聽聽聽_Ptr聽
=聽(_E聽*)_X.c_str();聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽// 澶嶅埗鍐呭鍒扮洰鐨勪覆
聽聽聽聽聽聽聽聽聽聽聽聽_Len聽
=聽_X.size();
聽聽聽聽聽聽聽聽聽聽聽聽_Res聽
=聽_X.capacity();
聽聽聽聽聽聽聽聽聽聽聽聽
++_Refcnt(_Ptr);聽}聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽// 澧炲姞涓嬈″紩鐢?/span>
聽聽聽聽聽聽聽聽
elseif聽(_Grow(_N,聽true))
聽聽聽聽聽聽聽聽聽聽聽聽
{_Tr::copy(_Ptr,聽&_X.c_str()[_P],聽_N);
聽聽聽聽聽聽聽聽聽聽聽聽_Eos(_N);聽}

聽聽聽聽聽聽聽聽
return聽(*this);聽}

榪欐牱緇撴灉灝辨槸璋冪敤=鍙蜂互鍚庯紝s2鍦板潃鍜宻1鍦板潃涓鏍鳳紝閮芥槸0x00364ff9銆?br />
鍋囧鎴戜滑鍔ㄦ佸簱鏈夎繖鏍蜂竴涓被class DLL鎺ュ彛錛?/p>

SetString(std::string聽str)
{
m_str聽
=聽str;
}

鍦ㄥ鎴瘋皟鐢ㄦ椂鍊欙細

std::string聽str聽="wlwlxj";
DLL聽d;
d.SetString(str);聽
//聽姝ゆ椂娌℃湁娣辨嫹璐濓紝鑰屾槸寮曠敤浜唖tr鍐呴儴鎸囬拡鍦板潃
鍦ㄨ皟鐢ㄧ粨鏉熺殑鏃跺欙紝dll鍐呴儴鍒犻櫎鎴愬憳鍙橀噺鐨勬椂鍊欙紝浼氬垽鏂璵_str鍐呴儴鎸囬拡鍚堟硶鎬э紝鐢變簬瀹為檯鍒嗛厤鏄湪璋冪敤绔紝鍦╠ll鍐呴儴鑷劧媯鏌ユ寚閽堥潪娉曘?br />
瑙e喅鏂規硶灝辨槸閬垮厤std::string寮曠敤璁℃暟錛屾帴鍙e淇敼涓篠etString(const char*)錛岃繖鏍峰湪dll鍐呴儴鍒嗛厤鍐呭瓨錛屽唴閮ㄩ噴鏀撅紝灝變笉浼氭湁闂銆?img src ="http://www.shnenglu.com/wlwlxj/aggbug/5819.html" width = "1" height = "1" />

]]>
C++ Template: The Complete Guide 瀛︿範錛? 妯℃澘涓殑鍛藉悕http://www.shnenglu.com/wlwlxj/archive/2006/04/08/5169.html涓囪繛鏂?/dc:creator>涓囪繛鏂?/author>Sat, 08 Apr 2006 03:38:00 GMThttp://www.shnenglu.com/wlwlxj/archive/2006/04/08/5169.htmlhttp://www.shnenglu.com/wlwlxj/comments/5169.htmlhttp://www.shnenglu.com/wlwlxj/archive/2006/04/08/5169.html#Feedback0http://www.shnenglu.com/wlwlxj/comments/commentRss/5169.htmlhttp://www.shnenglu.com/wlwlxj/services/trackbacks/5169.html絎?绔?妯℃澘涓殑鍚嶅瓧
鍚嶅瓧鍦ㄥぇ澶氭暟緙栫▼璇█涓兘鏄渶鍩烘湰鐨勬蹇碉紝紼嬪簭鍛樼敤瀹冩潵寮曠敤鍏堝墠鍒涘緩鐨勫璞°傚綋C++緙栬瘧鍣ㄩ亣鍒頒竴涓悕瀛楋紝瀹冭鍘繪煡鎵懼茍璇嗗埆鍝釜瀵硅薄琚紩鐢ㄣ備粠瀹炵幇鑰呰搴︽潵鐪嬶紝C++鍦ㄤ竴縐嶅己綾誨瀷璇█銆傝冭檻琛ㄨ揪寮廥*Y錛氬鏋淴鍜孻閮芥槸鍙橀噺鍚嶏紝閭d箞鏄箻娉曡〃杈懼紡錛涘鏋淴鏄被鍨嬪悕錛岃繖鏉¤鍙ユ妸Y澹版槑涓篨綾誨瀷鐨勪竴涓寚閽堛?br />
榪欎釜渚嬪瓙琛ㄦ槑C++錛堝拰C涓鏍鳳級鏄笂涓嬫枃鏁忔劅鐨勮璦錛氬鏋滄病鏈変笂涓嬫枃錛屼竴鏉$▼搴忔寚浠ゅ緢闅捐緙栬瘧鍣ㄧ悊瑙c傝繖涓庢ā鏉挎湁浠涔堝叧緋誨憿錛熷棷錛屾ā鏉垮繀欏誨鐞嗘洿澶氱殑涓婁笅鏂囷細(1)妯℃澘鍐呴儴涓婁笅鏂囷紱(2)妯℃澘瀹炰緥鍖栨椂鐨勪笂涓嬫枃錛?3)妯℃澘瀹炰緥鍖栨椂妯℃澘鍙傛暟鐨勪笂涓嬫枃銆傚湪C++涓繀欏誨皬蹇冨鐞嗗悕瀛楋紝瀵規浣犱笉搴旇鎰熷埌鎯婅銆?br />
9.1 鍚嶅瓧鍒嗙被瀛?/strong>
浜嬪疄涓奀++鐨勫悕瀛楀垎綾繪湁寰堝縐嶃備負浜嗕究浜庤蹇嗭紝鎴戜滑鎻愪緵浜嗚〃鏍?.1鍜岃〃鏍?.2鎻忚堪浜嗚繖浜涘垎綾匯傚垢榪愮殑鏄綘鍙敤鐔熸倝涓嬮潰2縐嶄富瑕佺殑鍛藉悕姒傚康錛屽氨鍙互寰堝ソ鐨勭悊瑙++妯℃澘涓亣鍒扮殑闂錛?br />
1銆侀檺瀹氬悕錛氬悕瀛楀湪浣滅敤鍩熶腑琚樉寮忔寚紺轟綔鐢ㄥ煙瑙f瀽榪愮畻絎?::)鎴栬呮垚鍛樿闂繍綆楃(.鎴栬?font face="Courier New">->)銆備緥濡傦細this->count鏄檺瀹氬悕錛岃宑ount涓嶆槸錛堝敖綆ount鏈夊彲鑳芥槸鏌愪釜綾葷殑鎴愬憳錛夈?br />2銆佷緷璧栧悕錛氬悕瀛椾緷璧栦簬妯℃澘鍙傛暟銆備緥濡傦細std::vector<T>::iterator錛屽鏋淭鏄ā鏉垮弬鏁幫紝iterator灝辨槸渚濊禆鍚嶏紱濡傛灉T鏄凡鐭ョ被鍨嬶紙姣斿int錛夛紝iterator灝辨槸闈炰緷璧栧悕銆?br />
琛ㄦ牸聽9.1.聽鍚嶅瓧鍒嗙被瀛?(絎竴閮ㄥ垎)

鍒嗙被

娉ㄩ噴

鏍囪瘑絎?/p>

鐢卞瓧絎︺佷笅鍒掔嚎(_)鍜屾暟瀛楃粍鎴愮殑鍚嶅瓧錛屼笉鑳戒互鏁板瓧寮澶淬傛湁涓浜涙爣璇嗙鏄繚鐣欑殑錛屼綘涓嶈兘鍦ㄨ嚜宸辯▼搴忎腑寮曞叆瀹冧滑(涓縐嶉伩鍏嶅紩鍏ョ殑絎ㄦ柟娉曟槸浠鎴栬卂_浣滀負鍓嶇紑)銆傚瓧絎︾殑姒傚康寰堝箍娉涳紝鍖呮嫭瀵歸潪瀛楁瘝璇█緙栫爜鐨勭壒孌婂瓧絎︺?/p>

鎿嶄綔絎︾被

鍏抽敭瀛梠perator 鍚庨潰璺熺潃涓涓鍙楓備緥濡俹perator new鍜宱perator []銆傚緢澶氭搷浣滅閮芥槸澶氫箟鐨勶紝渚嬪operator &鍙互鏄寜浣嶄笌榪愮畻錛屼篃鍙互鏄彇鍦板潃榪愮畻銆?/p>

杞崲綾?/p>

鎸囩ず鐢ㄦ埛瀹氫箟鐨勯殣寮忕被鍨嬭漿鎹€備緥濡俹perator int&錛屾垜浠彲浠ユ妸瀹冭漿鎹㈡垚int綾誨瀷鐨勪綅涓庢搷浣?/p>

妯℃澘綾?/p>

template鍚庨潰璺熺潃<>錛岄噷闈㈡槸妯℃澘鍙傛暟銆備緥濡侺ist<T, int, 0>(涓ユ牸璁詫紝C++鏍囧噯鍙厑璁哥畝鍗曠殑鏍囪瘑絎︿負妯℃澘鍚嶏紝鎴栬鏈変簤璁鎿嶄綔絎︾被涔熸槸鍏佽鐨勶紱渚嬪錛歰perator+<X<int> >)銆?/p>

闈為檺瀹氱被

鏇翠竴鑸殑鏍囪瘑絎︺傚彲浠ユ槸涓婇潰鍑犵被(鏍囪瘑絎︺佹搷浣滅綾匯佽漿鎹㈢被鎴栨ā鏉跨被)鎴栬呮槸鏋愭瀯鍚?渚嬪錛屽儚~Data聽鎴?~List<T, T, N>涔嬬被鐨?/tt>絎﹀彿)銆?/font>

闄愬畾綾?/p>

闈為檺瀹氱被鍓嶉潰鍔犱笂綾繪垨鑰呭悕瀛楃┖闂撮檺瀹氾紝鎴栬呭叏灞浣滅敤鍩熻В鏋愯繍綆楃銆傛敞鎰忎竴涓悕瀛楁湰韜彲浠ユ槸闄愬畾鐨勶紝渚嬪::X, S::x, Array<T>::y, and ::N::A<T>::z銆?/tt>

闄愬畾鍚?/p>

榪欎釜鍚嶈瘝鍦ㄦ爣鍑嗕腑鏄病鏈夌殑錛屾垜浠敤瀹冩潵琛ㄧず鎵ц闄愬畾鏌ユ壘鐨勫悕瀛椼傜壒瀹氭儏鍐典笅錛屽氨鏄檺瀹氭爣璇嗘垨鑰呭湪闈為檺瀹氭爣璇嗗墠闈㈡樉寮忎嬌鐢ㄦ垚鍛樿闂繍綆楃(.聽鎴栬?->)銆備緥濡係::x, this->f,聽鍜?p->A::m銆傜劧鑰岋紝闄や簡class_mem 鍜宼his->class_mem鍦ㄤ笂涓嬫枃鐜涓槸絳夊悓鐨勬儏鍐典笅涓嶉渶瑕侀檺瀹氬悕錛屽叾浠栨儏鍐典笅蹇呴』鏄懼紡浣跨敤鎴愬憳璁塊棶榪愮畻絎︺?/tt>

闈為檺瀹氬悕

闈為檺瀹氭爣璇嗕笉鏄潪闄愬畾鍚嶃傝繖涔熶笉鏄竴涓爣鍑嗕腑鐨勬湳璇紝浣嗘槸鐩稿綋浜庢墽琛岄潪闄愬畾鏌ユ壘涓殑鍚嶅瓧銆?/p>


琛ㄦ牸聽9.2. 鍚嶅瓧鍒嗙被瀛?(絎簩閮ㄥ垎)

鍒嗙被

娉ㄩ噴

鍚嶅瓧

闄愬畾鎴栬呴潪闄愬畾鐨勫悕瀛椼?/p>

渚濊禆鍚?/p>

鍚嶅瓧渚濊禆浜庢ā鏉垮弬鏁般備換浣曞惈鏈夋ā鏉垮弬鏁扮殑闄愬畾鎴栬呴潪闄愬畾鍚嶅瓧閮芥槸渚濊禆鍚嶃傛澶栵紝鎴愬憳璁塊棶鎿嶄綔絎?.鎴?tt>->) 淇グ鐨勯檺瀹氬悕 錛屽鏋滄搷浣滅宸﹁竟鐨勮〃杈懼紡綾誨瀷渚濊禆浜庢ā鏉垮弬鏁幫紝閭d箞榪欎釜闄愬畾鍚嶆槸渚濊禆鐨勩傚挨鍏惰繖縐嶆儏鍐碉細this->b涓殑b鍦ㄦā鏉夸腑渚挎槸渚濊禆鍚嶃傛渶鍚庯紝ident(x, y, z)璋冪敤褰㈠紡涓殑ident褰撲笖浠呭綋鍙傛暟琛ㄨ揪寮忎腑鏈夌被鍨嬩緷璧栦簬妯℃澘鍙傛暟銆?/font>

闈炰緷璧栧悕

涓嶇鍚堜笂闈㈡弿榪扮殑鍚嶅瓧灝變笉鏄緷璧栧悕銆?/p>


涓婇潰榪欎簺鍚嶈瘝閫氬父鐢ㄦ潵鎻忚堪C++妯℃澘涓殑闂錛岄氳涓杈規槸寰堟湁鐢ㄧ殑錛屾垜浠彲浠ョ啛鎮夎繖浜涘悕璇嶏紝浣嗘病鏈夊繀瑕佽浣忔瘡涓悕璇嶇‘鍒囩殑鎰忔濄傞渶瑕佺殑鏃跺欙紝鎴戜滑鍙互閫氳繃绱㈠紩寰堝鏄撶殑鏌ラ槄銆?img src ="http://www.shnenglu.com/wlwlxj/aggbug/5169.html" width = "1" height = "1" />

]]>
C++ Template: The Complete Guide 瀛︿範錛?.5鍚庤http://www.shnenglu.com/wlwlxj/archive/2006/04/07/5157.html涓囪繛鏂?/dc:creator>涓囪繛鏂?/author>Fri, 07 Apr 2006 14:24:00 GMThttp://www.shnenglu.com/wlwlxj/archive/2006/04/07/5157.htmlhttp://www.shnenglu.com/wlwlxj/comments/5157.htmlhttp://www.shnenglu.com/wlwlxj/archive/2006/04/07/5157.html#Feedback0http://www.shnenglu.com/wlwlxj/comments/commentRss/5157.htmlhttp://www.shnenglu.com/wlwlxj/services/trackbacks/5157.html8.5 鍚庤
鑷?0騫翠唬鍚庢湡寮曞叆C++妯℃澘錛屽叾姒傚康鍜岃娉曚竴鐩翠繚鎸佺浉瀵圭ǔ瀹氥傜被妯℃澘銆佸嚱鏁版ā鏉夸互鍙婄被鍨嬪弬鏁般傞潪綾誨瀷鍙傛暟鏄ā鏉挎渶鍩虹鐨勫伐鍏楓?br />
鐒惰岋紝鍦ㄦ渶鍒濊璁$殑鍩虹涓婅繕鏄坊鍔犱簡涓浜涘唴瀹癸紝澶ч儴鍒嗘槸C++鏍囧噯搴撶殑闇瑕併傛垚鍛樻ā鏉挎槸娣誨姞鍐呭涓渶鍩烘湰鐨勩傚緢濂囨紝鍙湁鎴愬憳鍑芥暟妯℃澘琚寮忕撼鍏++鏍囧噯錛屾垚鍛樼被妯℃澘鎴愪負鏍囧噯鐨勪竴閮ㄥ垎榪樺瓨鍦ㄤ簤璁?br />
鍙嬪厓妯℃澘銆佺己鐪佹ā鏉垮弬鏁板拰妯℃澘妯℃澘鍙傛暟閮芥槸鏈榪戞墠娣誨姞榪涜璦涓殑銆傚0鏄庢ā鏉挎ā鏉垮弬鏁版湁鏃跺欑О浣滈珮綰ф硾鎬э紝瀹冧滑鏈鍒濊寮曞叆鍦–++鏍囧噯搴撲腑鎻愪緵涓縐嶅垎閰嶅櫒妯″瀷錛屽悗鏉ヨ繖縐嶅垎閰嶅櫒妯″瀷琚叾瀹冧笉渚濊禆妯℃澘妯℃澘鍙傛暟鎵鏇夸唬銆傜敱浜庢ā鏉挎ā鏉垮弬鏁拌鏍艱鏄庡埌鏍囧噯鍖栬繘紼嬪悗鏈熶粛涓嶅畬鍠勶紝鍑犱箮瑕佽浠庤璦涓墧闄ゃ傛渶緇堢敱浜嶤++鏍囧噯濮斿憳浼氬ぇ閮ㄥ垎鎴愬憳璧炴垚淇濈暀涓嬫潵騫跺畬鎴愪簡瑙勬牸璇存槑銆?img src ="http://www.shnenglu.com/wlwlxj/aggbug/5157.html" width = "1" height = "1" />

涓囪繛鏂?/a> 2006-04-07 22:24 鍙戣〃璇勮
]]>C++ Template: The Complete Guide 瀛︿範錛?.4鍙嬪厓http://www.shnenglu.com/wlwlxj/archive/2006/04/06/5119.html涓囪繛鏂?/dc:creator>涓囪繛鏂?/author>Thu, 06 Apr 2006 15:48:00 GMThttp://www.shnenglu.com/wlwlxj/archive/2006/04/06/5119.htmlhttp://www.shnenglu.com/wlwlxj/comments/5119.htmlhttp://www.shnenglu.com/wlwlxj/archive/2006/04/06/5119.html#Feedback0http://www.shnenglu.com/wlwlxj/comments/commentRss/5119.htmlhttp://www.shnenglu.com/wlwlxj/services/trackbacks/5119.html
8.4 鍙嬪厓
澹版槑鍙嬪厓鐨勬濇兂鍏跺疄寰堢畝鍗曪細鏍囪瘑涓涓被鎴栬呭嚱鏁幫紝瀵逛簬灝嗗叾澹版槑涓哄弸鍏冩墍鍦ㄧ殑綾誨叿鏈夋煇縐嶇壒鏉冦備絾鏄湪浠ヤ笅涓や釜鏂歸潰錛岄棶棰樹技涔庢湁鐐瑰鏉傦細
1銆佷竴涓弸鍏冨0鏄庡彧鑳芥槸涓涓疄浣撶殑鍞竴澹版槑錛堟敞錛氭垜榪樻病鐞嗚В錛屼笉鑳借В閲婏級
2銆佸弸鍏冨嚱鏁板0鏄庣殑鍚屾椂鍙互瀹氫箟銆?br />
鍙嬪厓綾誨湪澹版槑鐨勬椂鍊欎笉鍏佽瀹氫箟錛屾墍浠ヤ竴鑸笉浼氭湁闂銆傚湪妯℃澘鎯呭喌涓嬶紝鍞竴涓鐐逛笉鍚屽氨鏄彲浠ュ皢綾繪ā鏉跨殑涓涓壒瀹氬疄渚嬪0鏄庝負鍙嬪厓錛?br />
template<typename聽T>
class聽Node;

template
<typename聽T>
class聽Tree{
聽聽聽聽friend聽
class聽Node<T>;
聽聽聽聽鈥?br />}
;
娉ㄦ剰錛氱被妯℃澘鍦ㄨ涓涓被鎴栬呯被妯℃澘澹版槑涓哄弸鍏冪殑鏃跺欏繀欏繪槸鍙鐨勶紝鑰屽浜庢櫘閫氱殑綾誨垯娌℃湁榪欑闇姹傦細
template<typename聽T>
class聽Tree{聽
聽聽聽聽friend聽
class聽Factory;聽聽聽聽聽聽聽聽//聽OK,聽even聽if聽first聽declaration聽of聽Factory
聽聽聽聽friend聽classclass聽Node<T>;聽聽//聽ERROR聽if聽Node聽isn't聽visible
}
;聽

8.4.1 鍙嬪厓鍑芥暟
鍑芥暟妯℃澘鐨勫疄渚嬪彲浠ラ氳繃鍦ㄥ嚱鏁板悕鍚庨潰璺熶竴瀵?lt;>灝嗗叾澹版槑涓哄弸鍏冦?lt;>閲岄潰鍙互鍖呭惈妯℃澘鍙傛暟錛屽鏋滅紪璇戝櫒鍙互鎺ㄥ鍑烘ā鏉垮弬鏁幫紝鍙互鐪佺暐璋冩ā鏉垮弬鏁幫細
template<typename聽T1,聽typename聽T2>
void聽combine(T1,聽T2);

class聽Mixer{
聽聽聽聽friend聽
void聽combine<>(int&,聽int&);
聽聽聽聽
//聽OK:聽T1聽=聽int&,聽T2聽=聽int&
聽聽聽聽friend聽void聽combine<int,聽int>(int,聽int);
聽聽聽聽
//聽OK:聽T1聽=聽int,聽T2聽=聽int
聽聽聽聽friend聽void聽combine<char>(char,聽int);
聽聽聽聽
//聽OK:聽T1聽=聽char聽T2聽=聽int
聽聽聽聽friend聽void聽combine<char>(char&,聽int);
聽聽聽聽
//聽ERROR:聽doesn't聽match聽combine()聽template
聽聽聽聽friend聽void聽combine<>(long,聽long)聽{聽}
聽聽聽聽
//聽ERROR:聽definition聽not聽allowed!
}
;
錛堟敞錛氬湪GCC涓嬫祴璇曪紝VS2003涓嶈錛?br />娉ㄦ剰錛氭垜浠彲浠ュ妯℃澘榪涜涓撻棬鍖栧畾涔夛紝浣嗘槸涓嶈兘瀵規ā鏉垮疄渚嬭繘琛屽畾涔夛紝鎵浠ュ0鏄庢ā鏉垮疄渚嬩負鍙嬪厓鏃朵笉鑳藉畾涔夈?br />
濡傛灉鍚嶅瓧鍚庨潰璺熸湁<>錛屾湁2縐嶅彲鑳斤細
1銆佸鏋滃悕瀛楁病鏈夐檺瀹氳瘝錛堜篃灝辨槸鍓嶉潰娌℃湁::錛夛紝灝變笉鍙兘鏄ā鏉垮疄渚嬨傚鏋滃湪澹版槑鍙嬪厓鐨勫湴鏂規病鏈夐潪妯℃澘鍑芥暟鍖歸厤鐨勮瘽錛屽氨鏄嚱鏁扮殑棣栨澹版槑錛屽0鏄庡悓鏃跺彲浠ュ畾涔夈?br />2銆佸鏋滃悕瀛楁湁闄愬畾璇嶏紝閭d箞涓瀹氫笌鍓嶉潰澹版槑鐨勫嚱鏁版垨鑰呮ā鏉垮嚱鏁版湁鍏籌紝鍦ㄥ尮閰嶇殑鏃跺欎紭鍏堥夋嫨闈炲嚱鏁版ā鏉胯屼笉鏄嚱鏁版ā鏉匡紝鐒惰屽湪澹版槑鐨勬椂鍊欐槸涓嶅厑璁稿畾涔夌殑銆?br />
涓嬮潰鐨勪緥瀛愭葷粨浜嗗悇縐嶅彲鑳芥э細
void聽multiply聽(void*);聽聽聽//聽ordinary聽function聽

template聽
<typename聽T>
void聽multiply(T);聽聽聽聽聽聽聽聽//聽function聽template聽

class聽Comrades聽{聽
聽聽聽聽friend聽
void聽multiply(int)聽{}
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
//聽defines聽a聽new聽function聽::multiply(int)聽

聽聽聽聽friend聽
void聽::multiply(void*);聽
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
//聽refers聽to聽the聽ordinary聽function聽above;聽
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
//聽not聽to聽the聽multiply<void*>聽instance聽

聽聽聽聽friend聽
void聽::multiply(int);聽
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
//聽refers聽to聽an聽instance聽of聽the聽template聽

聽聽聽聽friend聽
void聽::multiply<double*>(double*);聽
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
//聽qualified聽names聽can聽also聽have聽angle聽brackets聽
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
//聽but聽a聽template聽must聽be聽visible.聽

聽聽聽聽friend聽
void聽::error()聽{}
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
//聽ERROR:聽a聽qualified聽friend聽cannot聽be聽a聽definition聽
}
;聽

錛堟敞錛氬湪VS2003鍜岃鍒欏鍚堬紝GCC涓婄紪璇戝畬鍏ㄩ氳繃錛?br />
鍓嶉潰渚嬪瓙鎴戜滑璁ㄨ浜嗕竴鑸被錛堢浉瀵逛簬綾繪ā鏉匡級閲岄潰鐨勫弸鍏冨嚱鏁幫紝閬靛畧鐨勮鍒欏悓鏍烽傜敤浜庣被妯℃澘錛屼絾妯℃澘鍙傛暟鍦ㄧ‘瀹氬弸鍏冨嚱鏁扮殑鏃跺欎細璧蜂綔鐢細
template<typename聽T>
class聽Node聽{
聽聽聽聽Node
<T>*聽allocate();
}
;聽

template
<typename聽T>
class聽List聽{
聽聽聽聽friend聽Node
<T>*聽Node<T>::allocate();
}
;

鐒惰岋紝褰撳弸鍏冨嚱鏁板湪綾繪ā鏉塊噷闈㈠0鏄庡茍瀹氫箟鐨勬椂鍊欎細鍑虹幇鏈夎叮鐨勭幇璞★紝鍥犱負妯℃澘閲岄潰浠諱綍涓滆タ鍦ㄦ湭瀹炰緥鍖栦箣鍓嶉兘鍙槸澹版槑鑰屾病鏈夊叿鐜般傝冭檻涓嬮潰鐨勪緥瀛愶細
template<typename聽T>
class聽Creator聽{聽
聽聽聽聽friend聽
void聽appear()聽{聽聽//聽a聽new聽function聽::appear(),聽but聽it聽doesn't
聽聽聽聽聽聽聽聽鈥β犅犅犅犅犅犅犅犅犅犅犅犅犅犅犅犅犅犅?/span>//聽exist聽until聽Creator聽is聽instantiated
聽聽聽聽}

}
;

Creator
<void>聽miracle;聽聽//聽::appear()聽is聽created聽at聽this聽point
Creator<double>聽oops;聽聽聽//聽ERROR:聽::appear()聽is聽created聽a聽second聽time!
榪欎釜渚嬪瓙涓ā鏉跨殑涓ゆ瀹炰緥鍖栧鑷村悓涓鍑芥暟瀹氫箟澶氭錛岃繚鍙嶄簡涓嬈″畾涔夎鍒欍?br />
鎵浠ュ浜庝笂闈㈢殑鎯呭喌錛屾垜浠繀欏葷‘淇濈被妯℃澘鐨勬ā鏉垮弬鏁板嚭鐜板湪澹版槑騫跺畾涔夌殑鍙嬪厓鍑芥暟褰㈠弬閲岄潰錛堥櫎闈炴兂闃繪澶氭瀹炰緥鍖栦竴涓被妯℃澘錛岃繖濂藉儚涓嶅お鍙兘錛夈傛妸榪欎釜瑙勫緥榪愮敤鍒板墠闈㈤偅涓緥瀛愶細
template<typename聽T>
class聽Creator聽{聽
聽聽聽聽friend聽
void聽feed(Creator<T>*){聽聽//聽every聽T聽generates聽a聽different
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
//聽function聽::feed()
聽聽聽聽}

}
;

Creator
<void>聽one;聽聽聽聽聽//聽generates聽::feed(Creator<void>*)
Creator<double>聽two;聽聽聽//聽generates聽::feed(Creator<double>*)
榪欎釜渚嬪瓙涓紝Creator姣忎釜瀹炰緥閮界敓鎴愪笉鍚岀殑鍑芥暟銆傛敞鎰忚繖浜涘嚱鏁版槸綾繪ā鏉垮疄渚嬩駭鐢熺殑錛屼絾鍑芥暟鏈韓騫朵笉鏄嚱鏁版ā鏉跨殑瀹炰緥錛岃屾槸鏅氬嚱鏁般?br />榪樿娉ㄦ剰榪欎簺鍑芥暟浣撳畾涔変簬綾諱腑錛岄粯璁ゆ槸鍐呰仈鐨勶紝鎵浠ュ湪涓や釜緲昏瘧鍗曞厓浜х敓鐩稿悓鐨勫嚱鏁版槸娌℃湁闂鐨勩傦紙娉細鐢變簬鍐呰仈鍑芥暟鍩轟簬浠g爜鏇夸唬鎶鏈紝鎵浠ヤ竴涓嚱鏁板畾涔夋墍鍦ㄧ殑h鏂囦歡琚嬈″寘鍚笉浼氭湁闂錛屽唴鑱斿嚱鏁板湪緙栬瘧鍣ㄧ湅鏉ュ氨鏄竴孌典唬鐮併傦級

8.4.2 鍙嬪厓妯℃澘
涓鑸儏鍐墊垜浠兘鏄妸鍑芥暟妯℃澘鎴栬呯被妯℃澘鐨勬煇涓瀹炰緥澹版槑涓哄弸鍏冿紝浣嗘妸妯℃澘鏈韓澹版槑涓哄弸鍏冩湁鏃跺欎篃鏄潪甯告湁鐢ㄧ殑銆傝繖灝遍渶瑕佹墍璋撶殑妯℃澘鍙嬪厓錛屼緥濡傦細
class聽Manager聽{聽
聽聽聽聽template
<typename聽T>
聽聽聽聽friend聽
class聽Task;
聽聽聽聽
聽聽聽聽template
<typename聽T>
聽聽聽聽friend聽
void聽Schedule<T>::dispatch(Task<T>*);
聽聽聽聽
聽聽聽聽template
<typename聽T>
聽聽聽聽friend聽
int聽ticket()聽{
聽聽聽聽聽聽聽聽
return++Manager::counter;
聽聽聽聽}

聽聽聽聽
staticint聽counter;
}
;
鍜屾櫘閫氬弸鍏冨嚱鏁頒竴鏍鳳紝娌℃湁闄愬畾璇嶄笖鍚嶅瓧鍚庨潰娌℃湁<>鐨勫嚱鏁版ā鏉垮湪澹版槑涓哄弸鍏冨悓鏃跺彲浠ュ畾涔夈?br />澹版槑鍘熷鍑芥暟妯℃澘鎴栬呭師濮嬬被妯℃澘涓哄弸鍏冪殑鏃跺欙紝鎵鏈夌浉鍏崇殑鍋忕壒鍖栦互鍙婃樉紺虹壒渚嬪寲閮借嚜鍔ㄦ垚涓哄弸鍏冦?br />錛堟敞錛氭祴璇曚唬鐮?br />
class聽Manager聽{聽
聽聽聽聽template
<typename聽T>聽聽聽聽//聽firend聽template
聽聽聽聽friend聽class聽Task;
private:
聽聽聽聽
int聽聽聽聽_dat;
}
;

template
<typename聽T>
class聽Task聽{
}
;

template
<>
class聽Task<int>{聽聽聽聽聽聽聽聽聽聽聽聽//聽specialization
public:
聽聽聽聽
void聽accessData()
聽聽聽聽
{
聽聽聽聽聽聽聽聽_manager._dat聽
=0;聽聽聽聽//聽can聽access聽Manager's聽private聽data
聽聽聽聽}

private:
聽聽聽聽Manager聽聽聽聽_manager;
}
;

錛?br />(鏈妭瀹岋紝姹?..... 鑷繁鏀惰幏涓嶅皬)

]]>
鑳界敓鎴愯繖涓被鐨勪竴涓璞″槢錛燂紵錛?/title><link>http://www.shnenglu.com/wlwlxj/archive/2006/04/05/5052.html</link><dc:creator>涓囪繛鏂?/dc:creator><author>涓囪繛鏂?/author><pubDate>Wed, 05 Apr 2006 15:24:00 GMT</pubDate><guid>http://www.shnenglu.com/wlwlxj/archive/2006/04/05/5052.html</guid><wfw:comment>http://www.shnenglu.com/wlwlxj/comments/5052.html</wfw:comment><comments>http://www.shnenglu.com/wlwlxj/archive/2006/04/05/5052.html#Feedback</comments><slash:comments>12</slash:comments><wfw:commentRss>http://www.shnenglu.com/wlwlxj/comments/commentRss/5052.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/wlwlxj/services/trackbacks/5052.html</trackback:ping><description><![CDATA[涓嶈皥閫傜敤鎬э紝綰補璇硶涓婂疄鐜幫紝鎴戣嚜宸辨棤鑳戒負鍔涖?br /><br /><div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /><span style="COLOR: #000000">template</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">typename聽T,聽template</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">T聽a</span><span style="COLOR: #000000">></span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">class</span><span style="COLOR: #000000">聽T2</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #0000ff">class</span><span style="COLOR: #000000">聽TmTm<br /><img id="Codehighlighter1_56_58_Open_Image" onclick="this.style.display='none'; Codehighlighter1_56_58_Open_Text.style.display='none'; Codehighlighter1_56_58_Closed_Image.style.display='inline'; Codehighlighter1_56_58_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_56_58_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_56_58_Closed_Text.style.display='none'; Codehighlighter1_56_58_Open_Image.style.display='inline'; Codehighlighter1_56_58_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span><span id="Codehighlighter1_56_58_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/images/dot.gif" /></span><span id="Codehighlighter1_56_58_Open_Text"><span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span><span style="COLOR: #000000">;</span></div><img src ="http://www.shnenglu.com/wlwlxj/aggbug/5052.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/wlwlxj/" target="_blank">涓囪繛鏂?/a> 2006-04-05 23:24 <a href="http://www.shnenglu.com/wlwlxj/archive/2006/04/05/5052.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>涓涓ā鏉垮閥濡欐妧鏈紝璇硶鎶宸?/title><link>http://www.shnenglu.com/wlwlxj/archive/2006/04/05/5051.html</link><dc:creator>涓囪繛鏂?/dc:creator><author>涓囪繛鏂?/author><pubDate>Wed, 05 Apr 2006 14:26:00 GMT</pubDate><guid>http://www.shnenglu.com/wlwlxj/archive/2006/04/05/5051.html</guid><wfw:comment>http://www.shnenglu.com/wlwlxj/comments/5051.html</wfw:comment><comments>http://www.shnenglu.com/wlwlxj/archive/2006/04/05/5051.html#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://www.shnenglu.com/wlwlxj/comments/commentRss/5051.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/wlwlxj/services/trackbacks/5051.html</trackback:ping><description><![CDATA[ <p>鐮旂┒Boost鍓嶏紝鎯蟲繁鍏ヤ簡瑙d竴涓嬫ā鏉挎妧鏈紝鎵炬潵涓鏈功銆奀++ Template:The Complete Guide銆嬬爺絀躲?br />閲岄潰鏈夎繖鏍蜂竴涓皬鎶宸э紝鍒ゆ柇涓涓被涓槸鍚︽湁鏌愮綾誨艦銆備笅闈㈡槸浠g爜錛?Win 2K+ VS2003)<br /></p> <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"> <img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /> <span style="COLOR: #000000">#include聽</span> <span style="COLOR: #000000"><</span> <span style="COLOR: #000000">iostream</span> <span style="COLOR: #000000">></span> <span style="COLOR: #000000"> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /> </span> <span style="COLOR: #008000">//</span> <span style="COLOR: #008000">聽榪斿洖綾誨瀷,澶у皬鍒嗗埆涓?銆?</span> <span style="COLOR: #008000"> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /> </span> <span style="COLOR: #000000">typedef聽</span> <span style="COLOR: #0000ff">char</span> <span style="COLOR: #000000">聽RT1;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" />typedef聽</span> <span style="COLOR: #0000ff">struct</span> <span style="COLOR: #000000"> <br /> <img id="Codehighlighter1_71_85_Open_Image" onclick="this.style.display='none'; Codehighlighter1_71_85_Open_Text.style.display='none'; Codehighlighter1_71_85_Closed_Image.style.display='inline'; Codehighlighter1_71_85_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /> <img id="Codehighlighter1_71_85_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_71_85_Closed_Text.style.display='none'; Codehighlighter1_71_85_Open_Image.style.display='inline'; Codehighlighter1_71_85_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /> </span> <span id="Codehighlighter1_71_85_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"> <img src="http://www.shnenglu.com/images/dot.gif" /> </span> <span id="Codehighlighter1_71_85_Open_Text"> <span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span> <span style="COLOR: #0000ff">char</span> <span style="COLOR: #000000">聽a[</span> <span style="COLOR: #000000">2</span> <span style="COLOR: #000000">];<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span> </span> <span style="COLOR: #000000">聽RT2;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /></span> <span style="COLOR: #008000">//</span> <span style="COLOR: #008000">聽閫夋嫨榪欎釜鐗堟湰灝嗚繑鍥瀋har,澶у皬涓?</span> <span style="COLOR: #008000"> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /> </span> <span style="COLOR: #000000">template</span> <span style="COLOR: #000000"><</span> <span style="COLOR: #000000">typename聽T</span> <span style="COLOR: #000000">></span> <span style="COLOR: #000000">聽RT1聽test(typename聽T::X聽</span> <span style="COLOR: #0000ff">const</span> <span style="COLOR: #000000">*</span> <span style="COLOR: #000000">)<br /><img id="Codehighlighter1_167_193_Open_Image" onclick="this.style.display='none'; Codehighlighter1_167_193_Open_Text.style.display='none'; Codehighlighter1_167_193_Closed_Image.style.display='inline'; Codehighlighter1_167_193_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_167_193_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_167_193_Closed_Text.style.display='none'; Codehighlighter1_167_193_Open_Image.style.display='inline'; Codehighlighter1_167_193_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span> <span id="Codehighlighter1_167_193_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"> <img src="http://www.shnenglu.com/images/dot.gif" /> </span> <span id="Codehighlighter1_167_193_Open_Text"> <span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span> <span style="COLOR: #0000ff">int</span> <span style="COLOR: #000000">聽聽聽聽dumy聽聽聽聽</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">0</span> <span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽dumy</span> <span style="COLOR: #000000">++</span> <span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span> </span> <span style="COLOR: #000000"> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /> </span> <span style="COLOR: #008000">//</span> <span style="COLOR: #008000">聽閫夋嫨榪欎釜鐗堟湰灝嗚繑鍥瀋har,澶у皬涓?</span> <span style="COLOR: #008000"> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /> </span> <span style="COLOR: #000000">template</span> <span style="COLOR: #000000"><</span> <span style="COLOR: #000000">typename聽T</span> <span style="COLOR: #000000">></span> <span style="COLOR: #000000">聽RT2聽test(<img src="http://www.shnenglu.com/images/dot.gif" />)<br /><img id="Codehighlighter1_253_279_Open_Image" onclick="this.style.display='none'; Codehighlighter1_253_279_Open_Text.style.display='none'; Codehighlighter1_253_279_Closed_Image.style.display='inline'; Codehighlighter1_253_279_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_253_279_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_253_279_Closed_Text.style.display='none'; Codehighlighter1_253_279_Open_Image.style.display='inline'; Codehighlighter1_253_279_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span> <span id="Codehighlighter1_253_279_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"> <img src="http://www.shnenglu.com/images/dot.gif" /> </span> <span id="Codehighlighter1_253_279_Open_Text"> <span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span> <span style="COLOR: #0000ff">int</span> <span style="COLOR: #000000">聽聽聽聽dumy聽聽聽聽</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">0</span> <span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽dumy</span> <span style="COLOR: #000000">++</span> <span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span> </span> <span style="COLOR: #000000"> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /> </span> <span style="COLOR: #008000">//</span> <span style="COLOR: #008000">聽渚濋潬緙栬瘧鍣ㄨ嚜鍔ㄩ夋嫨test鍑芥暟,鐒跺悗渚濇嵁榪斿洖綾誨瀷鍒ゆ柇鏄惁鍚湁X</span> <span style="COLOR: #008000"> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /> </span> <span style="COLOR: #000000">template</span> <span style="COLOR: #000000"><</span> <span style="COLOR: #000000">typename聽T</span> <span style="COLOR: #000000">></span> <span style="COLOR: #000000"> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /> </span> <span style="COLOR: #0000ff">bool</span> <span style="COLOR: #000000">聽type_has_member_type_X()<br /><img id="Codehighlighter1_369_441_Open_Image" onclick="this.style.display='none'; Codehighlighter1_369_441_Open_Text.style.display='none'; Codehighlighter1_369_441_Closed_Image.style.display='inline'; Codehighlighter1_369_441_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_369_441_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_369_441_Closed_Text.style.display='none'; Codehighlighter1_369_441_Open_Image.style.display='inline'; Codehighlighter1_369_441_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span> <span id="Codehighlighter1_369_441_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"> <img src="http://www.shnenglu.com/images/dot.gif" /> </span> <span id="Codehighlighter1_369_441_Open_Text"> <span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span> <span style="COLOR: #0000ff">return</span> <span style="COLOR: #000000">聽(</span> <span style="COLOR: #0000ff">sizeof</span> <span style="COLOR: #000000">(test</span> <span style="COLOR: #000000"><</span> <span style="COLOR: #000000">T</span> <span style="COLOR: #000000">></span> <span style="COLOR: #000000">(</span> <span style="COLOR: #000000">0</span> <span style="COLOR: #000000">))聽</span> <span style="COLOR: #000000">==</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">1</span> <span style="COLOR: #000000">);<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span> </span> <span style="COLOR: #000000"> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /> </span> <span style="COLOR: #008000">//</span> <span style="COLOR: #008000">聽鏈塜綾誨瀷鐨勭被</span> <span style="COLOR: #008000"> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /> </span> <span style="COLOR: #0000ff">class</span> <span style="COLOR: #000000">聽HasX<br /><img id="Codehighlighter1_465_491_Open_Image" onclick="this.style.display='none'; Codehighlighter1_465_491_Open_Text.style.display='none'; Codehighlighter1_465_491_Closed_Image.style.display='inline'; Codehighlighter1_465_491_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_465_491_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_465_491_Closed_Text.style.display='none'; Codehighlighter1_465_491_Open_Image.style.display='inline'; Codehighlighter1_465_491_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span> <span id="Codehighlighter1_465_491_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"> <img src="http://www.shnenglu.com/images/dot.gif" /> </span> <span id="Codehighlighter1_465_491_Open_Text"> <span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /></span> <span style="COLOR: #0000ff">public</span> <span style="COLOR: #000000">:<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span> <span style="COLOR: #0000ff">class</span> <span style="COLOR: #000000">聽X<br /><img id="Codehighlighter1_485_488_Open_Image" onclick="this.style.display='none'; Codehighlighter1_485_488_Open_Text.style.display='none'; Codehighlighter1_485_488_Closed_Image.style.display='inline'; Codehighlighter1_485_488_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_485_488_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_485_488_Closed_Text.style.display='none'; Codehighlighter1_485_488_Open_Image.style.display='inline'; Codehighlighter1_485_488_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />聽聽聽聽</span> <span id="Codehighlighter1_485_488_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"> <img src="http://www.shnenglu.com/images/dot.gif" /> </span> <span id="Codehighlighter1_485_488_Open_Text"> <span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />聽聽聽聽}</span> </span> <span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span> </span> <span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /></span> <span style="COLOR: #008000">//</span> <span style="COLOR: #008000">聽鏃燲綾誨瀷鐨勭被</span> <span style="COLOR: #008000"> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /> </span> <span style="COLOR: #0000ff">class</span> <span style="COLOR: #000000">聽NonX<br /><img id="Codehighlighter1_516_542_Open_Image" onclick="this.style.display='none'; Codehighlighter1_516_542_Open_Text.style.display='none'; Codehighlighter1_516_542_Closed_Image.style.display='inline'; Codehighlighter1_516_542_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_516_542_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_516_542_Closed_Text.style.display='none'; Codehighlighter1_516_542_Open_Image.style.display='inline'; Codehighlighter1_516_542_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span> <span id="Codehighlighter1_516_542_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"> <img src="http://www.shnenglu.com/images/dot.gif" /> </span> <span id="Codehighlighter1_516_542_Open_Text"> <span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /></span> <span style="COLOR: #0000ff">public</span> <span style="COLOR: #000000">:<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span> <span style="COLOR: #0000ff">class</span> <span style="COLOR: #000000">聽Y<br /><img id="Codehighlighter1_536_539_Open_Image" onclick="this.style.display='none'; Codehighlighter1_536_539_Open_Text.style.display='none'; Codehighlighter1_536_539_Closed_Image.style.display='inline'; Codehighlighter1_536_539_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_536_539_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_536_539_Closed_Text.style.display='none'; Codehighlighter1_536_539_Open_Image.style.display='inline'; Codehighlighter1_536_539_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />聽聽聽聽</span> <span id="Codehighlighter1_536_539_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"> <img src="http://www.shnenglu.com/images/dot.gif" /> </span> <span id="Codehighlighter1_536_539_Open_Text"> <span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />聽聽聽聽}</span> </span> <span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span> </span> <span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /></span> <span style="COLOR: #0000ff">int</span> <span style="COLOR: #000000">聽_tmain(</span> <span style="COLOR: #0000ff">int</span> <span style="COLOR: #000000">聽argc,聽_TCHAR</span> <span style="COLOR: #000000">*</span> <span style="COLOR: #000000">聽argv[])<br /><img id="Codehighlighter1_583_934_Open_Image" onclick="this.style.display='none'; Codehighlighter1_583_934_Open_Text.style.display='none'; Codehighlighter1_583_934_Closed_Image.style.display='inline'; Codehighlighter1_583_934_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_583_934_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_583_934_Closed_Text.style.display='none'; Codehighlighter1_583_934_Open_Image.style.display='inline'; Codehighlighter1_583_934_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span> <span id="Codehighlighter1_583_934_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"> <img src="http://www.shnenglu.com/images/dot.gif" /> </span> <span id="Codehighlighter1_583_934_Open_Text"> <span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span> <span style="COLOR: #008000">//</span> <span style="COLOR: #008000">聽緙栬瘧鍣ㄩ夋嫨閲嶈澆鍑芥暟絳栫暐:閫夋嫨綾誨瀷鏈鍖歸厤鐗堟湰<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span> <span style="COLOR: #008000">//</span> <span style="COLOR: #008000">聽鍊懼悜浜庢妸0杞寲涓哄父閲忕┖鎸囬拡,鎵浠ラ夋嫨榪斿洖涓篟T1鐗堟湰</span> <span style="COLOR: #008000"> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /> </span> <span style="COLOR: #000000">聽聽聽聽</span> <span style="COLOR: #0000ff">if</span> <span style="COLOR: #000000">(type_has_member_type_X</span> <span style="COLOR: #000000"><</span> <span style="COLOR: #000000">HasX</span> <span style="COLOR: #000000">></span> <span style="COLOR: #000000">())<br /><img id="Codehighlighter1_679_719_Open_Image" onclick="this.style.display='none'; Codehighlighter1_679_719_Open_Text.style.display='none'; Codehighlighter1_679_719_Closed_Image.style.display='inline'; Codehighlighter1_679_719_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_679_719_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_679_719_Closed_Text.style.display='none'; Codehighlighter1_679_719_Open_Image.style.display='inline'; Codehighlighter1_679_719_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />聽聽聽聽</span> <span id="Codehighlighter1_679_719_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"> <img src="http://www.shnenglu.com/images/dot.gif" /> </span> <span id="Codehighlighter1_679_719_Open_Text"> <span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽std::cout聽</span> <span style="COLOR: #000000"><<</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">Has聽X</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000"><<</span> <span style="COLOR: #000000">聽std::endl;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />聽聽聽聽}</span> </span> <span style="COLOR: #000000"> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span> <span style="COLOR: #0000ff">else</span> <span style="COLOR: #000000"> <br /> <img id="Codehighlighter1_728_768_Open_Image" onclick="this.style.display='none'; Codehighlighter1_728_768_Open_Text.style.display='none'; Codehighlighter1_728_768_Closed_Image.style.display='inline'; Codehighlighter1_728_768_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /> <img id="Codehighlighter1_728_768_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_728_768_Closed_Text.style.display='none'; Codehighlighter1_728_768_Open_Image.style.display='inline'; Codehighlighter1_728_768_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />聽聽聽聽</span> <span id="Codehighlighter1_728_768_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"> <img src="http://www.shnenglu.com/images/dot.gif" /> </span> <span id="Codehighlighter1_728_768_Open_Text"> <span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽std::cout聽</span> <span style="COLOR: #000000"><<</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">Non聽X</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000"><<</span> <span style="COLOR: #000000">聽std::endl;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />聽聽聽聽}</span> </span> <span style="COLOR: #000000"> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span> <span style="COLOR: #008000">//</span> <span style="COLOR: #008000">聽娌℃湁T::X,鎵浠ラ夋嫨榪斿洖涓篟T2鐗堟湰</span> <span style="COLOR: #008000"> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /> </span> <span style="COLOR: #000000">聽聽聽聽</span> <span style="COLOR: #0000ff">if</span> <span style="COLOR: #000000">(type_has_member_type_X</span> <span style="COLOR: #000000"><</span> <span style="COLOR: #000000">NonX</span> <span style="COLOR: #000000">></span> <span style="COLOR: #000000">())<br /><img id="Codehighlighter1_832_872_Open_Image" onclick="this.style.display='none'; Codehighlighter1_832_872_Open_Text.style.display='none'; Codehighlighter1_832_872_Closed_Image.style.display='inline'; Codehighlighter1_832_872_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_832_872_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_832_872_Closed_Text.style.display='none'; Codehighlighter1_832_872_Open_Image.style.display='inline'; Codehighlighter1_832_872_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />聽聽聽聽</span> <span id="Codehighlighter1_832_872_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"> <img src="http://www.shnenglu.com/images/dot.gif" /> </span> <span id="Codehighlighter1_832_872_Open_Text"> <span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽std::cout聽</span> <span style="COLOR: #000000"><<</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">Has聽X</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000"><<</span> <span style="COLOR: #000000">聽std::endl;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />聽聽聽聽}</span> </span> <span style="COLOR: #000000"> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span> <span style="COLOR: #0000ff">else</span> <span style="COLOR: #000000"> <br /> <img id="Codehighlighter1_881_921_Open_Image" onclick="this.style.display='none'; Codehighlighter1_881_921_Open_Text.style.display='none'; Codehighlighter1_881_921_Closed_Image.style.display='inline'; Codehighlighter1_881_921_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /> <img id="Codehighlighter1_881_921_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_881_921_Closed_Text.style.display='none'; Codehighlighter1_881_921_Open_Image.style.display='inline'; Codehighlighter1_881_921_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />聽聽聽聽</span> <span id="Codehighlighter1_881_921_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"> <img src="http://www.shnenglu.com/images/dot.gif" /> </span> <span id="Codehighlighter1_881_921_Open_Text"> <span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽std::cout聽</span> <span style="COLOR: #000000"><<</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">Non聽X</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000"><<</span> <span style="COLOR: #000000">聽std::endl;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />聽聽聽聽}</span> </span> <span style="COLOR: #000000"> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span> <span style="COLOR: #0000ff">return</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">0</span> <span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span> </span> </div>杈撳嚭緇撴灉:<br />Has X<br />Non X<img src ="http://www.shnenglu.com/wlwlxj/aggbug/5051.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/wlwlxj/" target="_blank">涓囪繛鏂?/a> 2006-04-05 22:26 <a href="http://www.shnenglu.com/wlwlxj/archive/2006/04/05/5051.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>鎶戝埗妯℃澘浠g爜鑶ㄨ儉鐨勪竴縐嶆妧鏈?/title><link>http://www.shnenglu.com/wlwlxj/archive/2006/03/27/4659.html</link><dc:creator>涓囪繛鏂?/dc:creator><author>涓囪繛鏂?/author><pubDate>Mon, 27 Mar 2006 10:54:00 GMT</pubDate><guid>http://www.shnenglu.com/wlwlxj/archive/2006/03/27/4659.html</guid><wfw:comment>http://www.shnenglu.com/wlwlxj/comments/4659.html</wfw:comment><comments>http://www.shnenglu.com/wlwlxj/archive/2006/03/27/4659.html#Feedback</comments><slash:comments>7</slash:comments><wfw:commentRss>http://www.shnenglu.com/wlwlxj/comments/commentRss/4659.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/wlwlxj/services/trackbacks/4659.html</trackback:ping><description><![CDATA[ <p>妯℃澘鏄竴縐嶆簮鐮佸鐢ㄦ妧鏈?鍦ㄦ煇浜涙儏鍐典笅浣跨敤瀹冨彲浠ヤ嬌浠g爜鐪嬭搗鏉ラ潪甯鎬紭闆?钁楀悕鐨刡oost搴撳氨鏄ā鏉垮彂鎵殑鍏歌寖.<br />鐒惰屾ā鏉夸篃瀛樺湪寮婄,澶ч噺浣跨敤妯℃澘鍙兘瀵艱嚧浠g爜鑶ㄨ儉.涓嬮潰浠嬬粛涓縐嶈В鍐崇殑鏂規:</p> <p>鎴戜滑棣栧厛鐪嬩竴孌典竴鑸唬鐮?<br /></p> <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"> <img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /> <span style="COLOR: #000000">template</span> <span style="COLOR: #000000"><</span> <span style="COLOR: #000000">typename聽T</span> <span style="COLOR: #000000">></span> <span style="COLOR: #000000"> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /> </span> <span style="COLOR: #0000ff">class</span> <span style="COLOR: #000000">聽Vector<br /><img id="Codehighlighter1_34_169_Open_Image" onclick="this.style.display='none'; Codehighlighter1_34_169_Open_Text.style.display='none'; Codehighlighter1_34_169_Closed_Image.style.display='inline'; Codehighlighter1_34_169_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_34_169_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_34_169_Closed_Text.style.display='none'; Codehighlighter1_34_169_Open_Image.style.display='inline'; Codehighlighter1_34_169_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span> <span id="Codehighlighter1_34_169_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"> <img src="http://www.shnenglu.com/images/dot.gif" /> </span> <span id="Codehighlighter1_34_169_Open_Text"> <span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /></span> <span style="COLOR: #0000ff">public</span> <span style="COLOR: #000000">:<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span> <span style="COLOR: #0000ff">virtual</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">void</span> <span style="COLOR: #000000">聽Say()<br /><img id="Codehighlighter1_65_167_Open_Image" onclick="this.style.display='none'; Codehighlighter1_65_167_Open_Text.style.display='none'; Codehighlighter1_65_167_Closed_Image.style.display='inline'; Codehighlighter1_65_167_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_65_167_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_65_167_Closed_Text.style.display='none'; Codehighlighter1_65_167_Open_Image.style.display='inline'; Codehighlighter1_65_167_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />聽聽聽聽</span> <span id="Codehighlighter1_65_167_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"> <img src="http://www.shnenglu.com/images/dot.gif" /> </span> <span id="Codehighlighter1_65_167_Open_Text"> <span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">const</span> <span style="COLOR: #000000">聽type_info</span> <span style="COLOR: #000000">&</span> <span style="COLOR: #000000">聽聽聽聽t聽</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">聽typeid(T);<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽std::cout聽</span> <span style="COLOR: #000000"><<</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">Vector<</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000"><<</span> <span style="COLOR: #000000">聽t.name()聽</span> <span style="COLOR: #000000"><<</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">>::Hello</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000"><<</span> <span style="COLOR: #000000">聽std::endl;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />聽聽聽聽}</span> </span> <span style="COLOR: #000000"> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span> </span> <span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /></span> <span style="COLOR: #008000">//</span> <span style="COLOR: #008000">聽鐗逛緥鍖?/span> <span style="COLOR: #008000"> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /> </span> <span style="COLOR: #000000">template</span> <span style="COLOR: #000000"><></span> <span style="COLOR: #000000"> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /> </span> <span style="COLOR: #0000ff">class</span> <span style="COLOR: #000000">聽聽Vector</span> <span style="COLOR: #000000"><</span> <span style="COLOR: #0000ff">void</span> <span style="COLOR: #000000">*></span> <span style="COLOR: #000000"> <br /> <img id="Codehighlighter1_212_300_Open_Image" onclick="this.style.display='none'; Codehighlighter1_212_300_Open_Text.style.display='none'; Codehighlighter1_212_300_Closed_Image.style.display='inline'; Codehighlighter1_212_300_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /> <img id="Codehighlighter1_212_300_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_212_300_Closed_Text.style.display='none'; Codehighlighter1_212_300_Open_Image.style.display='inline'; Codehighlighter1_212_300_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /> </span> <span id="Codehighlighter1_212_300_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"> <img src="http://www.shnenglu.com/images/dot.gif" /> </span> <span id="Codehighlighter1_212_300_Open_Text"> <span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /></span> <span style="COLOR: #0000ff">public</span> <span style="COLOR: #000000">:<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span> <span style="COLOR: #0000ff">virtual</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">void</span> <span style="COLOR: #000000">聽Say()<br /><img id="Codehighlighter1_243_298_Open_Image" onclick="this.style.display='none'; Codehighlighter1_243_298_Open_Text.style.display='none'; Codehighlighter1_243_298_Closed_Image.style.display='inline'; Codehighlighter1_243_298_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_243_298_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_243_298_Closed_Text.style.display='none'; Codehighlighter1_243_298_Open_Image.style.display='inline'; Codehighlighter1_243_298_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />聽聽聽聽</span> <span id="Codehighlighter1_243_298_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"> <img src="http://www.shnenglu.com/images/dot.gif" /> </span> <span id="Codehighlighter1_243_298_Open_Text"> <span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽std::cout聽</span> <span style="COLOR: #000000"><<</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">Vector<void*>::Hello</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000"><<</span> <span style="COLOR: #000000">聽std::endl;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />聽聽聽聽}</span> </span> <span style="COLOR: #000000"> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span> </span> <span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /></span> <span style="COLOR: #0000ff">int</span> <span style="COLOR: #000000">聽_tmain(</span> <span style="COLOR: #0000ff">int</span> <span style="COLOR: #000000">聽argc,聽_TCHAR</span> <span style="COLOR: #000000">*</span> <span style="COLOR: #000000">聽argv[])<br /><img id="Codehighlighter1_341_441_Open_Image" onclick="this.style.display='none'; Codehighlighter1_341_441_Open_Text.style.display='none'; Codehighlighter1_341_441_Closed_Image.style.display='inline'; Codehighlighter1_341_441_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_341_441_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_341_441_Closed_Text.style.display='none'; Codehighlighter1_341_441_Open_Image.style.display='inline'; Codehighlighter1_341_441_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span> <span id="Codehighlighter1_341_441_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"> <img src="http://www.shnenglu.com/images/dot.gif" /> </span> <span id="Codehighlighter1_341_441_Open_Text"> <span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽Vector</span> <span style="COLOR: #000000"><</span> <span style="COLOR: #0000ff">int</span> <span style="COLOR: #000000">*></span> <span style="COLOR: #000000">聽聽聽聽pIntVec;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽pIntVec.Say();<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽Vector</span> <span style="COLOR: #000000"><</span> <span style="COLOR: #0000ff">double</span> <span style="COLOR: #000000">*></span> <span style="COLOR: #000000">聽聽聽聽pDoubleVec;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽pDoubleVec.Say();<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span> <span style="COLOR: #0000ff">return</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">0</span> <span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span> </span> </div> <p> <br />杈撳嚭:<br />Vector<int *>::Hello<br />Vector<double *>::Hello<br />浠庤繖閲?鎴戜滑鍙互鐪嬪嚭紼嬪簭鍦ㄨ繍琛岀殑榪囩▼涓敓浜т簡涓ゅ垎Vector鐨勪唬鐮?int*鍜宒ouble*),灝界榪欓噷鏈夌壒渚嬪寲,鐒惰岀被鍨嬩笉鍖歸厤,緙栬瘧鍣ㄥ湪緙栬瘧榪囩▼涓棤娉曞畾浣嶅埌鐗逛緥鍖栫増鏈?濡傛灉榪欎釜Vector琚互鐢ㄧ殑鍖?鎴戞兂鍗充嬌鏄竴涓腑絳夎妯$殑紼嬪簭涔熷彲鑳借楄垂鎴愬厗瀛楄妭鐨勪唬鐮佹帶浠?</p> <p>鎴戜滑蹇呴』瀵繪壘涓縐嶄腑闂存ˉ姊佷嬌緙栬瘧鍣ㄥ湪緙栬瘧榪囩▼涓畾浣嶅埌void*鐨勭壒渚嬪寲鐗堟湰.鎸夌収妯℃澘閫夋嫨絳栫暐,緙栬瘧鍣ㄦ繪槸閫夋嫨鏈鐗逛緥鍖栫殑妯℃澘,鎴戜滑鍙互閫氳繃涓涓腑闂寸殑妯℃澘鑱旂郴璧蜂笂闈袱涓増鏈殑妯℃澘.涓嬮潰鐪嬩竴孌典唬鐮?<br /></p> <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"> <img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /> <span style="COLOR: #000000">template</span> <span style="COLOR: #000000"><</span> <span style="COLOR: #000000">typename聽T</span> <span style="COLOR: #000000">></span> <span style="COLOR: #000000"> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /> </span> <span style="COLOR: #0000ff">class</span> <span style="COLOR: #000000">聽Vector<br /><img id="Codehighlighter1_34_115_Open_Image" onclick="this.style.display='none'; Codehighlighter1_34_115_Open_Text.style.display='none'; Codehighlighter1_34_115_Closed_Image.style.display='inline'; Codehighlighter1_34_115_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_34_115_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_34_115_Closed_Text.style.display='none'; Codehighlighter1_34_115_Open_Image.style.display='inline'; Codehighlighter1_34_115_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span> <span id="Codehighlighter1_34_115_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"> <img src="http://www.shnenglu.com/images/dot.gif" /> </span> <span id="Codehighlighter1_34_115_Open_Text"> <span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /></span> <span style="COLOR: #0000ff">public</span> <span style="COLOR: #000000">:<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span> <span style="COLOR: #0000ff">virtual</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">void</span> <span style="COLOR: #000000">聽Say()<br /><img id="Codehighlighter1_65_113_Open_Image" onclick="this.style.display='none'; Codehighlighter1_65_113_Open_Text.style.display='none'; Codehighlighter1_65_113_Closed_Image.style.display='inline'; Codehighlighter1_65_113_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_65_113_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_65_113_Closed_Text.style.display='none'; Codehighlighter1_65_113_Open_Image.style.display='inline'; Codehighlighter1_65_113_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />聽聽聽聽</span> <span id="Codehighlighter1_65_113_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"> <img src="http://www.shnenglu.com/images/dot.gif" /> </span> <span id="Codehighlighter1_65_113_Open_Text"> <span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽std::cout聽</span> <span style="COLOR: #000000"><<</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">Vector::Hello</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000"><<</span> <span style="COLOR: #000000">聽std::endl;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />聽聽聽聽}</span> </span> <span style="COLOR: #000000"> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span> </span> <span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /></span> <span style="COLOR: #008000">//</span> <span style="COLOR: #008000">聽鐗逛緥鍖?/span> <span style="COLOR: #008000"> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /> </span> <span style="COLOR: #000000">template</span> <span style="COLOR: #000000"><></span> <span style="COLOR: #000000"> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /> </span> <span style="COLOR: #0000ff">class</span> <span style="COLOR: #000000">聽聽Vector</span> <span style="COLOR: #000000"><</span> <span style="COLOR: #0000ff">void</span> <span style="COLOR: #000000">*></span> <span style="COLOR: #000000"> <br /> <img id="Codehighlighter1_158_246_Open_Image" onclick="this.style.display='none'; Codehighlighter1_158_246_Open_Text.style.display='none'; Codehighlighter1_158_246_Closed_Image.style.display='inline'; Codehighlighter1_158_246_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /> <img id="Codehighlighter1_158_246_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_158_246_Closed_Text.style.display='none'; Codehighlighter1_158_246_Open_Image.style.display='inline'; Codehighlighter1_158_246_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /> </span> <span id="Codehighlighter1_158_246_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"> <img src="http://www.shnenglu.com/images/dot.gif" /> </span> <span id="Codehighlighter1_158_246_Open_Text"> <span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /></span> <span style="COLOR: #0000ff">public</span> <span style="COLOR: #000000">:<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span> <span style="COLOR: #0000ff">virtual</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">void</span> <span style="COLOR: #000000">聽Say()<br /><img id="Codehighlighter1_189_244_Open_Image" onclick="this.style.display='none'; Codehighlighter1_189_244_Open_Text.style.display='none'; Codehighlighter1_189_244_Closed_Image.style.display='inline'; Codehighlighter1_189_244_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_189_244_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_189_244_Closed_Text.style.display='none'; Codehighlighter1_189_244_Open_Image.style.display='inline'; Codehighlighter1_189_244_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />聽聽聽聽</span> <span id="Codehighlighter1_189_244_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"> <img src="http://www.shnenglu.com/images/dot.gif" /> </span> <span id="Codehighlighter1_189_244_Open_Text"> <span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽std::cout聽</span> <span style="COLOR: #000000"><<</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">Vector<void*>::Hello</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000"><<</span> <span style="COLOR: #000000">聽std::endl;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />聽聽聽聽}</span> </span> <span style="COLOR: #000000"> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span> </span> <span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /></span> <span style="COLOR: #008000">//</span> <span style="COLOR: #008000">聽鐗逛緥鍖?/span> <span style="COLOR: #008000"> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /> </span> <span style="COLOR: #000000">template</span> <span style="COLOR: #000000"><</span> <span style="COLOR: #000000">typename聽T</span> <span style="COLOR: #000000">></span> <span style="COLOR: #000000"> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /> </span> <span style="COLOR: #0000ff">class</span> <span style="COLOR: #000000">聽Vector</span> <span style="COLOR: #000000"><</span> <span style="COLOR: #000000">T</span> <span style="COLOR: #000000">*></span> <span style="COLOR: #000000">聽:聽</span> <span style="COLOR: #0000ff">public</span> <span style="COLOR: #000000">聽Vector</span> <span style="COLOR: #000000"><</span> <span style="COLOR: #0000ff">void</span> <span style="COLOR: #000000">*></span> <span style="COLOR: #000000"> <br /> <img id="Codehighlighter1_318_320_Open_Image" onclick="this.style.display='none'; Codehighlighter1_318_320_Open_Text.style.display='none'; Codehighlighter1_318_320_Closed_Image.style.display='inline'; Codehighlighter1_318_320_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /> <img id="Codehighlighter1_318_320_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_318_320_Closed_Text.style.display='none'; Codehighlighter1_318_320_Open_Image.style.display='inline'; Codehighlighter1_318_320_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /> </span> <span id="Codehighlighter1_318_320_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"> <img src="http://www.shnenglu.com/images/dot.gif" /> </span> <span id="Codehighlighter1_318_320_Open_Text"> <span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span> </span> <span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /></span> <span style="COLOR: #0000ff">int</span> <span style="COLOR: #000000">聽_tmain(</span> <span style="COLOR: #0000ff">int</span> <span style="COLOR: #000000">聽argc,聽_TCHAR</span> <span style="COLOR: #000000">*</span> <span style="COLOR: #000000">聽argv[])<br /><img id="Codehighlighter1_361_461_Open_Image" onclick="this.style.display='none'; Codehighlighter1_361_461_Open_Text.style.display='none'; Codehighlighter1_361_461_Closed_Image.style.display='inline'; Codehighlighter1_361_461_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_361_461_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_361_461_Closed_Text.style.display='none'; Codehighlighter1_361_461_Open_Image.style.display='inline'; Codehighlighter1_361_461_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span> <span id="Codehighlighter1_361_461_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"> <img src="http://www.shnenglu.com/images/dot.gif" /> </span> <span id="Codehighlighter1_361_461_Open_Text"> <span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽Vector</span> <span style="COLOR: #000000"><</span> <span style="COLOR: #0000ff">int</span> <span style="COLOR: #000000">*></span> <span style="COLOR: #000000">聽聽聽聽pIntVec;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽pIntVec.Say();<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽Vector</span> <span style="COLOR: #000000"><</span> <span style="COLOR: #0000ff">double</span> <span style="COLOR: #000000">*></span> <span style="COLOR: #000000">聽聽聽聽pDoubleVec;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽pDoubleVec.Say();<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span> <span style="COLOR: #0000ff">return</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">0</span> <span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span> </span> </div> <p> <br />杈撳嚭:<br />Vector<void*>::Hello<br />Vector<void*>::Hello<br />浠庤繖閲?鎴戜滑鍙互鐪嬪嚭紼嬪簭鍦ㄨ繍琛岃繃紼嬩腑鍏ㄩ儴浣跨敤Vector<void*>鐨勭増鏈?class Vector<T*>妯℃澘渚挎槸鍏抽敭鐨勭幆鑺?緙栬瘧鍣ㄥ湪緙栬瘧榪囩▼涓?鐢變簬class Vector<T*>姣攃lass Vector鏇寸壒渚嬪寲,鎵浠ラ亣鍒癡ector<int*>鍜孷ector<double*>鏃墮兘閫夋嫨class Vector<T*>,鑰宑lass Vector<T*>緇ф壙Vector<void*>,涓涓洿鍔犵壒渚嬪寲鐗堟湰,鎵浠ョ紪璇戝櫒涓嶅啀浜х敓鏂扮殑妯℃澘鑰岄噰鐢╒ector<void*>榪欎釜鏈鐗逛緥鍖栫増鏈?榪欐牱鎵鏈夋寚閽堟ā鏉塊兘褰掔粨鍒癡ector<void*>,鑰宑lass Vector<T*>涓虹敤鎴鋒彁渚涗簡涓涓簿緹庤屼笖瀹夊叏鐨勭晫闈?鑰孷ector<void*>浣滀負搴曞眰瀹炵幇緇嗚妭琚殣钘?</p> <p>浠ヤ笂浠g爜鍦╒C 7.1(VS2003)涓紪璇戦氳繃,鐢變簬VC6瀵規ā鏉挎敮鎸佷笉濂?鎵浠ユā鏉跨殑楂樼駭鐢ㄦ硶涓鑸笉瑕佸湪VC6涓嬌鐢? <br /><a href="/files/wlwlxj/template.rar">涓嬭澆婕旂ず浠g爜</a></p> <img src ="http://www.shnenglu.com/wlwlxj/aggbug/4659.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/wlwlxj/" target="_blank">涓囪繛鏂?/a> 2006-03-27 18:54 <a href="http://www.shnenglu.com/wlwlxj/archive/2006/03/27/4659.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>感谢您访问我们的网站,您可能还对以下资源感兴趣:</p> <a href="http://www.shnenglu.com/" title="精品视频久久久久">精品视频久久久久</a> <div class="friend-links"> </div> </div> </footer> <a href="http://www.7788797.cn" target="_blank">国产2021久久精品</a>| <a href="http://www.pandingo.cn" target="_blank">无码8090精品久久一区</a>| <a href="http://www.www227.cn" target="_blank">久久精品一区二区国产</a>| <a href="http://www.vtdf.cn" target="_blank">丰满少妇高潮惨叫久久久</a>| <a href="http://www.qiaoyishiqy6.com.cn" target="_blank">色综合久久最新中文字幕</a>| <a href="http://www.micgroup.cn" target="_blank">久久久高清免费视频</a>| <a href="http://www.sunmuying.cn" target="_blank">亚洲AV无码成人网站久久精品大</a>| <a href="http://www.bjhaoruida.com.cn" target="_blank">久久棈精品久久久久久噜噜</a>| <a href="http://www.3q168.net.cn" target="_blank">久久不射电影网</a>| <a href="http://www.9ii8.cn" target="_blank">亚洲av日韩精品久久久久久a</a>| <a href="http://www.vfqt.cn" target="_blank">久久夜色精品国产亚洲</a>| <a href="http://www.ylfyw.cn" target="_blank">精品一二三区久久aaa片</a>| <a href="http://www.sank.net.cn" target="_blank">久久精品国产一区</a>| <a href="http://www.hrtexm.cn" target="_blank">天天爽天天狠久久久综合麻豆</a>| <a href="http://www.yajige.cn" target="_blank">99久久99久久精品国产片果冻</a>| <a href="http://www.tfy8.cn" target="_blank">亚洲va久久久噜噜噜久久男同 </a>| <a href="http://www.9dn.com.cn" target="_blank">丁香狠狠色婷婷久久综合</a>| <a href="http://www.bgbgb.cn" target="_blank">久久99久久成人免费播放</a>| <a href="http://www.yyyart.cn" target="_blank">久久久久人妻精品一区</a>| <a href="http://www.chuikua.cn" target="_blank">一本久久综合亚洲鲁鲁五月天</a>| <a href="http://www.daleiba.cn" target="_blank">91久久精一区二区三区大全</a>| <a href="http://www.xmgoogle.net.cn" target="_blank">久久国产欧美日韩精品免费</a>| <a href="http://www.ddvxo.cn" target="_blank">国产亚洲美女精品久久久</a>| <a href="http://www.designelite.com.cn" target="_blank">狠狠色丁香久久婷婷综合五月</a>| <a href="http://www.mijie5.cn" target="_blank">yy6080久久</a>| <a href="http://www.svelan.cn" target="_blank">中文字幕精品无码久久久久久3D日动漫 </a>| <a href="http://www.i33b.cn" target="_blank">久久午夜免费视频</a>| <a href="http://www.huiju58.cn" target="_blank">久久久久女教师免费一区</a>| <a href="http://www.3762g.cn" target="_blank">久久美女网站免费</a>| <a href="http://www.tst5.cn" target="_blank">久久免费精品视频</a>| <a href="http://www.dfyxw.cn" target="_blank">AV狠狠色丁香婷婷综合久久 </a>| <a href="http://www.mrzqjn.cn" target="_blank">久久这里只有精品首页</a>| <a href="http://www.dnnmodules.cn" target="_blank">久久精品国产一区二区三区</a>| <a href="http://www.acolor.com.cn" target="_blank">久久久久中文字幕</a>| <a href="http://www.liess.cn" target="_blank">91精品国产91久久久久久蜜臀</a>| <a href="http://www.lftdly.cn" target="_blank">精品久久久久久久</a>| <a href="http://www.hywsgc.cn" target="_blank">91精品婷婷国产综合久久</a>| <a href="http://www.pgt.net.cn" target="_blank">99久久综合狠狠综合久久</a>| <a href="http://www.trgba.cn" target="_blank">国产精品xxxx国产喷水亚洲国产精品无码久久一区 </a>| <a href="http://www.grayhound.cn" target="_blank">精品国产日韩久久亚洲</a>| <a href="http://www.haolook.cn" target="_blank">亚洲国产天堂久久综合</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>