锘??xml version="1.0" encoding="utf-8" standalone="yes"?>久久国产乱子伦免费精品,国产高潮国产高潮久久久91 ,亚洲国产精品久久久久网站 http://www.shnenglu.com/firehutter/category/2700.html闆曟爮鐜夌爩搴旂姽鍦紝鍙槸鏈遍鏀?/description>zh-cnMon, 19 May 2008 21:55:40 GMTMon, 19 May 2008 21:55:40 GMT60C++瀛︿範絎旇錛氱被緇ф壙涓叧浜庤櫄鍑芥暟鍜屽姩鎬佽仈緙栫殑鍑犵偣闂http://www.shnenglu.com/firehutter/archive/2006/11/29/15785.html鐖變笂闈掕彍鐨勫寘瀛?/dc:creator>鐖變笂闈掕彍鐨勫寘瀛?/author>Wed, 29 Nov 2006 09:27:00 GMThttp://www.shnenglu.com/firehutter/archive/2006/11/29/15785.htmlhttp://www.shnenglu.com/firehutter/comments/15785.htmlhttp://www.shnenglu.com/firehutter/archive/2006/11/29/15785.html#Feedback0http://www.shnenglu.com/firehutter/comments/commentRss/15785.htmlhttp://www.shnenglu.com/firehutter/services/trackbacks/15785.html鐪嬭搗鏉ワ紝鍦ㄥぇ澶氭暟鎯呭喌涓嬶紝鍔ㄦ佽仈緙栭兘鏇村ソ錛屽洜涓哄畠璁╃▼搴忚兘澶熼夋嫨涓虹壒瀹氱被鍨嬭璁$殑鏂規硶錛岃繖鏍烽棶棰樺氨鏉ヤ簡錛屾棦鐒跺姩鎬佽仈緙栬繖涔堝ソ錛屼負浠涔堣繕瑕佽璁′袱縐嶇被鍨嬬殑鑱旂紪錛熶負浠涔堥粯璁ょ殑鑱旂紪鏂規硶鏄潤鎬佺殑鑰屼笉鏄姩鎬侊紵

鍘熷洜鍏抽敭灝卞湪浜庢晥鐜囥係trousstrup璇磋繃錛堝緢緇忓吀錛屽懙鍛碉級錛欳++鐨勬寚瀵煎師鍒欎箣涓鏄紝涓嶈涓轟笉浣跨敤鐨勭壒鎬т粯鍑轟唬浠鳳紙鍐呭瓨鎴栧鐞嗘椂闂達級銆?br />
鍥犱負閫氬父鎯呭喌涓嬶紝緙栬瘧鍣ㄥ鐞嗚櫄鍑芥暟鐨勬柟娉曚負錛氱粰姣忎釜瀵硅薄娣誨姞涓涓殣钘忔垚鍛橈紝璇ユ垚鍛樹腑淇濆瓨浜嗕竴涓寚鍚戝嚱鏁板湴鍧鏁扮粍鐨勬寚閽堬紙縐頒負铏氬嚱鏁拌〃 virtual function table,vtbl錛夈傝櫄鍑芥暟琛ㄤ腑瀛樺偍浜嗕負綾誨璞¤繘琛屽0鏄庣殑铏氬嚱鏁扮殑鍦板潃銆備緥濡傦紝鍩虹被鍖呭惈涓涓寚閽堬紝鎸囧悜浜嗗熀綾諱腑鎵鏈夎櫄鍑芥暟鐨勫湴鍧琛紝媧劇敓綾誨璞″皢鍖呭惈涓涓寚鍚戠嫭绔嬪湴鍧琛ㄧ殑鎸囬拡錛屽鏋滄淳鐢熺被鎻愪緵浜嗚櫄鍑芥暟鐨勬柊瀹氫箟錛岃铏氬嚱鏁拌〃灝嗕繚瀛樻柊鍑芥暟鐨勫湴鍧錛屽鏋滄病鏈夐噸鏂板畾涔夛紝鍒欎繚鐣欏師濮嬬増鏈殑鍦板潃銆傝皟鐢ㄨ櫄鍑芥暟鏃訛紝紼嬪簭灝嗘煡鐪嬪瓨鍌ㄥ湪瀵硅薄涓殑vtbl鍦板潃錛岀劧鍚庤漿鍚戠浉搴旂殑鍑芥暟鍦板潃琛ㄣ?br />
鎵浠ユ樉鑰屾槗瑙佺殑鏄紝浣跨敤铏氬嚱鏁版椂錛屽湪鍐呭瓨鍜屾墽琛岄熷害鏂歸潰鏈変竴瀹氱殑棰濆鎴愭湰錛屽寘鎷細
姣忎釜瀵硅薄閮藉皢澧炲ぇ錛屽澶ч噺涓哄瓨鍌ㄥ湴鍧鐨勭┖闂達紱瀵規瘡涓被錛岀紪璇戝櫒閮藉垱寤轟竴涓櫄鍑芥暟鍦板潃琛紙鏁扮粍錛夛紱姣忎釜鍑芥暟璋冪敤閮介渶瑕佹墽琛屼竴姝ラ澶栫殑鎿嶄綔錛屽嵆鍒拌〃涓煡鎵懼湴鍧銆?br />
鎵浠ュ挶浠鍏繪垚鐨勪範鎯槸錛屽湪璁捐綾繪椂錛屽彲鑳藉寘鍚竴浜涗笉鍦ㄦ淳鐢熺被閲嶆柊瀹氫箟鐨勬垚鍛樺嚱鏁幫紝閭d箞榪欎簺鍑芥暟灝變笉瑕佽緗負铏氬嚱鏁般傝繖鏍烽鍏堜細鏈夋洿濂界殑鏁堢巼錛屽叾嬈¤澹版槑涓鴻櫄鍑芥暟鐨勬垚鍛樺嚱鏁板氨琛ㄦ槑鏄鏈熷湪媧劇敓綾諱腑浼氳閲嶆柊瀹氫箟鐨勶紝鍦ㄩ槄璇諱唬鐮佹椂涔熷皢姣旇緝鏂逛究銆?img src ="http://www.shnenglu.com/firehutter/aggbug/15785.html" width = "1" height = "1" />

]]>
榪欎袱澶╃敤C++Builder鏃剁鍒頒竴鐐歸棶棰橈紝鍏充簬TQuary鐨?/title><link>http://www.shnenglu.com/firehutter/archive/2006/10/26/14255.html</link><dc:creator>鐖變笂闈掕彍鐨勫寘瀛?/dc:creator><author>鐖變笂闈掕彍鐨勫寘瀛?/author><pubDate>Thu, 26 Oct 2006 13:25:00 GMT</pubDate><guid>http://www.shnenglu.com/firehutter/archive/2006/10/26/14255.html</guid><wfw:comment>http://www.shnenglu.com/firehutter/comments/14255.html</wfw:comment><comments>http://www.shnenglu.com/firehutter/archive/2006/10/26/14255.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/firehutter/comments/commentRss/14255.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/firehutter/services/trackbacks/14255.html</trackback:ping><description><![CDATA[ <p>榪欏嚑澶╂嬁鍒板叕鍙鎬互鍓嶉」鐩腑鐨勪竴涓敤C++Builder鍋氱殑紼嬪簭錛屽湪鎴戞満鍣ㄤ笂璋冭瘯錛岀粨鏋滄彁紺哄嚭閿欙細Operation not applicable</p> <p>浣跨敤鏂偣璺熻釜涔嬪悗鍙戠幇閿欒鍑哄湪浣跨敤TQuery鏃舵墽琛宱pen鏂規硶鏃訛紝鍥炶拷鏍規簮錛屽緱鍑轟互涓嬪弽棣堬細<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">m_pqQuery</span> <span style="COLOR: #000000">-></span> <span style="COLOR: #000000">SQL</span> <span style="COLOR: #000000">-></span> <span style="COLOR: #000000">Add(聽</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">Select聽*聽From聽Table1聽Where聽Id聽=聽:PId聽</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">聽);<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" />m_pqQuery</span> <span style="COLOR: #000000">-></span> <span style="COLOR: #000000">ParamByName(聽</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">PId</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">聽)</span> <span style="COLOR: #000000">-></span> <span style="COLOR: #000000">AsInteger聽聽聽聽聽</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">聽鏌愪釜int鍙橀噺;</span> </div> <p> <br />鎵ц瀹岃繖鍙ヤ箣鍚庯紝鎸夋甯告儏鍐碉紝鍙傛暟PId搴旇琚祴浜堜簡涓涓暣褰㈠鹼紝浣嗘槸Debug璺熻釜鏄劇ず鍏跺艱繕鏄窡鏈祴鍊煎墠鏄悓鏍瘋〃紺虹殑鏈煡鍊箋傛墍浠ュ湪鎵цopen鏂規硶鏃跺嚭閿欎簡銆?/p> <p>濡傛灉鎴戜笉鏄敤璇ユ柟娉曪紝鐩存帴鎶奡QL璇彞鍐欐錛?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">m_pqQuery</span> <span style="COLOR: #000000">-></span> <span style="COLOR: #000000">SQL</span> <span style="COLOR: #000000">-></span> <span style="COLOR: #000000">Add(聽</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">Select聽*聽From聽Table1聽Where聽Id聽=聽0聽</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">聽);</span> </div> <p> <br />榪愯姝e父</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: #0000ff">char</span> <span style="COLOR: #000000">聽sql[</span> <span style="COLOR: #000000">80</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">聽n聽</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">聽鏌愭暣褰㈠彉閲徛?<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" />sprintf(sql,</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">Select聽*聽From聽Table1聽Where聽Id聽=聽%d</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">,n);<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" />pqQuery</span> <span style="COLOR: #000000">-></span> <span style="COLOR: #000000">SQL</span> <span style="COLOR: #000000">-></span> <span style="COLOR: #000000">Add(sql);</span> </div> <p> <br />涔熻繍琛屾甯?/p> <p>鏌ヤ簡涓嬶紝鍘熸潵緇欏弬鏁拌祴鍊肩殑鏂規硶騫舵病鏈夐敊璇紝緙栬瘧涔熻兘閫氳繃錛屽喌涓斾互鍓嶈紼嬪簭鑲畾鏄兘姝e父榪愯鐨勩傘傜湡鏄鎬負浠涔堝湪鎴戣繖閲屽氨璧嬩笉涓婂箋傘傝皟璇曚簡寰堜箙涔熸病鑳芥壘鍒板師鍥狅紝鍙ソ浣滅艦錛屼負浜嗛『鍒╄繍琛岋紝鍙兘鏀逛負sprintf鍜岀洿鎺ヨ繛鎺ュ瓧絎︿覆鐨勬柟寮忋?br />鍦ㄨ繖閲岃涓婁竴絎旓紝甯屾湜浠ュ悗鑳藉鎵懼埌鍘熷洜銆傘傘?br /></p> <img src ="http://www.shnenglu.com/firehutter/aggbug/14255.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/firehutter/" target="_blank">鐖變笂闈掕彍鐨勫寘瀛?/a> 2006-10-26 21:25 <a href="http://www.shnenglu.com/firehutter/archive/2006/10/26/14255.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>C++瀛︿範絎旇錛氱被涓庡姩鎬佸唴瀛樺垎閰嶄腑鍚勭闂鐨勯樁孌墊ф葷粨http://www.shnenglu.com/firehutter/archive/2006/09/28/13111.html鐖變笂闈掕彍鐨勫寘瀛?/dc:creator>鐖變笂闈掕彍鐨勫寘瀛?/author>Thu, 28 Sep 2006 07:18:00 GMThttp://www.shnenglu.com/firehutter/archive/2006/09/28/13111.htmlhttp://www.shnenglu.com/firehutter/comments/13111.htmlhttp://www.shnenglu.com/firehutter/archive/2006/09/28/13111.html#Feedback1http://www.shnenglu.com/firehutter/comments/commentRss/13111.htmlhttp://www.shnenglu.com/firehutter/services/trackbacks/13111.html
  • 閲嶈澆<<鎿嶄綔絎?br />瑕侀噸鏂板畾涔?lt;<鎿嶄綔絎︼紝浠ヤ究灝嗗畠鍜宑out涓璧風敤鏉ユ樉紺哄璞$殑鍐呭錛岃瀹氫箟涓嬮潰鐨勫弸鍏冩搷浣滅鍑芥暟錛?
    ostream聽&operator<<聽(ostream聽&聽os,const聽c_name聽&聽obj)
    {
    os聽
    <<;//聽display聽object聽contents
    return聽os;
    }

    鍏朵腑c_name鏄被鍚嶃傚鏋滆綾繪彁渚涗簡鑳藉榪斿洖鎵闇鍐呭鐨勫叕鏈夋柟娉曪紝鍒欏彲鍦ㄦ搷浣滅鍑芥暟涓嬌鐢ㄨ繖浜涙柟娉曪紝榪欐牱渚夸笉浼氬皢浠栦滑璁劇疆涓哄弸鍏冨嚱鏁頒簡銆?br />
  • 杞崲鍑芥暟
    瑕佸皢鍗曚釜鍊艱漿鎹負綾葷被鍨嬶紝闇瑕佸垱寤哄師鍨嬪涓嬫墍紺虹殑綾繪瀯閫犲嚱鏁幫細
    c_name(type_name聽value);

    鍏朵腑c_name涓虹被鍚嶏紝type_name鏄杞崲鐨勭被鍨嬬殑鍚嶇О銆?br />瑕佸皢綾昏漿鎹負鍏朵粬綾誨瀷錛岄渶瑕佸垱寤哄師鍨嬪涓嬫墍紺虹殑綾繪垚鍛樺嚱鏁幫細
    operator聽type_name();

    铏界劧璇ュ嚱鏁版病鏈夊0鏄庤繑鍥炵被鍨嬶紝浣嗗簲榪斿洖鎵闇綾誨瀷鐨勫箋?br />浣跨敤杞崲鍑芥暟鏃惰灝忓績銆傚彲浠ュ湪澹版槑鏋勯犲嚱鏁版椂浣跨敤鍏抽敭瀛梕xplicit錛屼互闃叉瀹冭鐢ㄤ簬闅愬紡杞崲銆?br />
  • 鍏舵瀯閫犲嚱鏁頒嬌鐢╪ew鐨勭被
    濡傛灉綾諱嬌鐢╪ew鎿嶄綔絎︽潵鍒嗛厤綾繪垚鍛樻寚鍚戠殑鍐呭瓨錛屽湪璁捐鏃跺簲閲囧彇涓浜涢闃叉帾鏂姐?
    • 瀵逛簬鎸囧悜鐨勫唴瀛樻槸鐢眓ew鍒嗛厤鐨勬墍鏈夌被鎴愬憳錛岄兘搴斿湪綾葷殑鏋愭瀯鍑芥暟涓鍏朵嬌鐢╠elete錛岃鎿嶄綔絎﹀皢閲婃斁鍒嗛厤鐨勫唴瀛樸?
    • 濡傛灉鏋愭瀯鍑芥暟閫氳繃瀵規寚閽堢被鎴愬憳浣跨敤delete鏉ラ噴鏀懼唴瀛橈紝鍒欐瘡涓瀯閫犲嚱鏁伴兘搴斿綋浣跨敤new鏉ュ垵濮嬪寲鎸囬拡錛屾垨灝嗗畠璁劇疆涓虹┖鎸囬拡銆?
    • 鏋勯犲嚱鏁頒腑瑕佷箞浣跨敤new[]錛岃涔堜嬌鐢╪ew錛岃屼笉鑳芥販鐢ㄣ傚鏋滄瀯閫犲嚱鏁頒嬌鐢ㄧ殑鏄痭ew[]錛屽垯鏋愭瀯鍑芥暟搴斾嬌鐢╠elete[]錛涘鏋滄瀯閫犲嚱鏁頒嬌鐢ㄧ殑鏄痭ew錛屽垯鏋愭瀯鍑芥暟搴旈傜敤delete銆?
    • 搴斿畾涔変竴涓垎閰嶅唴瀛橈紙鑰屼笉鏄皢鎸囬拡鎸囧悜宸叉湁鍐呭瓨錛夌殑澶嶅埗鏋勯犲嚱鏁般傝繖鏍風▼搴忚兘澶熷皢綾誨璞″垵濮嬪寲涓哄彟涓涓璞°傝繖縐嶆瀯閫犲嚱鏁板師鍨嬪涓嬶細
      className(const聽className聽&)
    • 搴斿畾涔変竴涓噸杞借祴鍊兼搷浣滅鐨勭被鎴愬憳鍑芥暟錛屽叾鍑芥暟瀹氫箟濡備笅錛堝叾涓璫_pointer鏄痗_name鐨勭被鎴愬憳錛岀被鍨嬩負鎸囧悜type_name鐨勬寚閽堬級銆備笅闈㈢殑鑼冧緥鍋囪浣跨敤new[]鏉ュ垵濮嬪寲鍙橀噺c_pointer錛夛細
      c_name聽&聽c_name::operator=聽(const聽c_name聽&聽cn)
      {
      if聽(this==&聽cn)
      return*this;

      delete聽[]聽c_pointer;
      //聽set聽size聽number聽of聽type_name聽units聽to聽be聽copyied
      c_pointer聽=new聽type_name[size];
      //聽then聽copy聽data聽pointed聽to聽by聽cn.c_pointer聽to
      //聽location聽pointed聽to聽by聽c_pointer

      return*this;
      }

    鏈枃瀵規垜鍓嶉潰鍑犵瘒闅忕瑪涓彁鍒扮殑闂涔熶綔鍑轟簡涓涓葷粨錛屾劅瑙夊緢鏈夊繀瑕佽涓嬫潵銆?br />浠ヤ笂鍐呭鍘熸枃寮曠敤鑷弬鑰冧功綾嶄腑鍐呭銆?br />
    鍙傝冧功綾嶏細C++PrimerPlus author:Stephen Prata



    ]]>
    C++瀛︿範絎旇錛氬叧浜嶤++綾諱笌鍔ㄦ佸唴瀛樺垎閰嶄腑甯冨眬new鎿嶄綔絎?/title><link>http://www.shnenglu.com/firehutter/archive/2006/09/28/13107.html</link><dc:creator>鐖變笂闈掕彍鐨勫寘瀛?/dc:creator><author>鐖變笂闈掕彍鐨勫寘瀛?/author><pubDate>Thu, 28 Sep 2006 06:42:00 GMT</pubDate><guid>http://www.shnenglu.com/firehutter/archive/2006/09/28/13107.html</guid><wfw:comment>http://www.shnenglu.com/firehutter/comments/13107.html</wfw:comment><comments>http://www.shnenglu.com/firehutter/archive/2006/09/28/13107.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.shnenglu.com/firehutter/comments/commentRss/13107.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/firehutter/services/trackbacks/13107.html</trackback:ping><description><![CDATA[ <p>聽</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: #0000ff">const</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">int</span> <span style="COLOR: #000000">聽BUF聽</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">512</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">聽JustTesting<br /><img id="Codehighlighter1_41_157_Open_Image" onclick="this.style.display='none'; Codehighlighter1_41_157_Open_Text.style.display='none'; Codehighlighter1_41_157_Closed_Image.style.display='inline'; Codehighlighter1_41_157_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_41_157_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_41_157_Closed_Text.style.display='none'; Codehighlighter1_41_157_Open_Image.style.display='inline'; Codehighlighter1_41_157_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span> <span id="Codehighlighter1_41_157_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_41_157_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" />聽聽聽聽聽聽聽聽JustTesting(</span> <span style="COLOR: #0000ff">const</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">string</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">&</span> <span style="COLOR: #000000">聽s聽</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">Just聽Testing</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">,</span> <span style="COLOR: #0000ff">int</span> <span style="COLOR: #000000">聽n聽</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">0</span> <span style="COLOR: #000000">)<br /><img id="Codehighlighter1_114_118_Open_Image" onclick="this.style.display='none'; Codehighlighter1_114_118_Open_Text.style.display='none'; Codehighlighter1_114_118_Closed_Image.style.display='inline'; Codehighlighter1_114_118_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_114_118_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_114_118_Closed_Text.style.display='none'; Codehighlighter1_114_118_Open_Image.style.display='inline'; Codehighlighter1_114_118_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />聽聽聽聽聽聽聽聽</span> <span id="Codehighlighter1_114_118_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_118_Open_Text"> <span style="COLOR: #000000">{<img src="http://www.shnenglu.com/images/dot.gif" />}</span> </span> <span style="COLOR: #000000">聽<br /><img id="Codehighlighter1_137_141_Open_Image" onclick="this.style.display='none'; Codehighlighter1_137_141_Open_Text.style.display='none'; Codehighlighter1_137_141_Closed_Image.style.display='inline'; Codehighlighter1_137_141_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_137_141_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_137_141_Closed_Text.style.display='none'; Codehighlighter1_137_141_Open_Image.style.display='inline'; Codehighlighter1_137_141_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />聽聽聽聽聽聽聽聽</span> <span style="COLOR: #000000">~</span> <span style="COLOR: #000000">JustTesting()</span> <span id="Codehighlighter1_137_141_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_137_141_Open_Text"> <span style="COLOR: #000000">{<img src="http://www.shnenglu.com/images/dot.gif" />}</span> </span> <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" />聽聽聽聽<img src="http://www.shnenglu.com/images/dot.gif" /><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">聽main()<br /><img id="Codehighlighter1_172_565_Open_Image" onclick="this.style.display='none'; Codehighlighter1_172_565_Open_Text.style.display='none'; Codehighlighter1_172_565_Closed_Image.style.display='inline'; Codehighlighter1_172_565_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_172_565_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_172_565_Closed_Text.style.display='none'; Codehighlighter1_172_565_Open_Image.style.display='inline'; Codehighlighter1_172_565_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span> <span id="Codehighlighter1_172_565_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_172_565_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">聽</span> <span style="COLOR: #000000">*</span> <span style="COLOR: #000000">聽buffer聽</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">new</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">char</span> <span style="COLOR: #000000">聽[BUF];<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" />聽聽聽聽JustTesting聽</span> <span style="COLOR: #000000">*</span> <span style="COLOR: #000000">pc1,</span> <span style="COLOR: #000000">*</span> <span style="COLOR: #000000">pc2,</span> <span style="COLOR: #000000">*</span> <span style="COLOR: #000000">pc3,</span> <span style="COLOR: #000000">*</span> <span style="COLOR: #000000">pc4;<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" />聽聽聽聽pc1聽</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">new</span> <span style="COLOR: #000000">聽(buffer)聽JustTesting;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽pc2聽</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">new</span> <span style="COLOR: #000000">聽JustTesting(聽</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">聽Heap1聽</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">聽,聽</span> <span style="COLOR: #000000">20</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" />聽聽聽聽pc3聽</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">new</span> <span style="COLOR: #000000">聽(buffer聽</span> <span style="COLOR: #000000">+</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">sizeof</span> <span style="COLOR: #000000">聽(JustTesting))聽JustTesting(</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">Bad聽Idea</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">,</span> <span style="COLOR: #000000">6</span> <span style="COLOR: #000000">);聽聽</span> <span style="COLOR: #008000">//</span> <span style="COLOR: #008000">聽姝ゅ鐢ㄤ竴涓狫ustTesging瀵硅薄澶у皬鐨勫亸縐婚噺閬垮厤pc3涓巔c1鍗犵敤鍚屼竴鍧楀唴瀛橈紝鍥犱負濡傛灉綾誨姩鎬佺殑涓哄叾鎴愬憳鍒嗛厤鍐呭瓨錛屽崰鐢ㄥ悓涓鍐呭瓨灝嗕細浜х敓闂銆偮?/span> <span style="COLOR: #008000"> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /> </span> <span style="COLOR: #000000">聽聽聽聽pc4聽</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">new</span> <span style="COLOR: #000000">聽JustTesting(</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">Heap2</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">,</span> <span style="COLOR: #000000">10</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" />聽聽聽聽<img src="http://www.shnenglu.com/images/dot.gif" /><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" />聽聽聽聽delete聽pc2;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽delete聽pc4;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽delete聽[]聽buffer;<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 />浠ヤ笂浠g爜鐗囨柇涓紝pc1鍜宲c3涓哄竷灞new鎿嶄綔絎︽潵鍒嗛厤鍐呭瓨錛岃宲c2鍜宲c4涓哄父瑙刵ew鎿嶄綔絎︽潵鍒嗛厤鍐呭瓨聽銆?br />瀵逛簬甯歌new鎿嶄綔絎﹀垎閰嶇殑鍐呭瓨錛屽彲浠ョ洿鎺ヤ嬌鐢細<span style="COLOR: #000000"><span id="tnzzbxh" class="Code"><span style="COLOR: #000000">delete聽pc2; </span></span></span>榪欐牱鐨勮鍙ユ搷浣滄潵閲婃斁鍐呭瓨銆?br /><br />鑰屽浜庡竷灞new鎿嶄綔絎﹀垎閰嶇殑鍐呭瓨灝變笉鑳借繖鏍峰仛錛?span style="COLOR: #000000"><span id="prvflfp" class="Code"><span style="COLOR: #000000">delete聽pc1;</span></span></span></p> <p>鍥犱負pc1鍜宲c3騫舵病鏈夌洿鎺ユ敹鍒皀ew鎿嶄綔絎﹁繑鍥炵殑鍦板潃錛岃屾槸鐢卞竷灞鎿嶄綔絎︽寚鍚戜簡buffer鐨勫湴鍧錛宯ew/delete緋葷粺鐭ラ亾宸插垎閰嶇殑512瀛楄妭鍧梑uffer錛屼絾瀵瑰竷灞new鎿嶄綔絎﹀璇ュ唴瀛樺潡鍋氫簡浣曠澶勭悊涓鏃犳墍鐭ャ?br />鍙︿竴鏂歸潰錛宐uffer鐨勫湴鍧鏄敤<font color="#000000"><span id="hhvptjv" class="Code">new []</span>鍒濆鍖栫殑錛屽洜姝ゅ繀欏諱嬌鐢?span class="Code">delete[]</span>鑰屼笉鏄?span class="Code">delete</span></font>銆?br /><font color="#ff0000">娉ㄦ剰錛氬嵆浣縝uffer鏄嬌鐢╪ew鑰屼笉鏄痭ew[]鍒濆鍖栫殑錛?span class="Code">delete pc1 </span>涔熷皢閲婃斁buffer錛岃屼笉鏄痯c1銆?/font></p> <p>浠ヤ笂鐨勪唬鐮佺‘瀹為噴鏀句簡buffer錛?font color="#000000"><span id="vnfjlhh" class="Code">delete [] buffer;</span><br /></font>浣嗘槸鐢辨浜х敓浜嗘柊鐨勯棶棰橈紝瀹冩病鏈変負甯冨眬new鎿嶄綔絎﹀湪璇ュ唴瀛樺潡涓垱寤虹殑瀵硅薄璋冪敤鏋愭瀯鍑芥暟錛屾垜浠彧闇瑕佸湪鏋愭瀯鍑芥暟涓斁鍏ヤ竴孌墊樉紺鴻鍙ュ氨鍙互娓呮鐨勭湅鍒幫紝紼嬪簭騫舵病鏈夐攢姣佲淛ustTesting鈥濆拰鈥淏ad Idea鈥濓紝涔熷氨鏄痯c1鍜宲c3鎸囧悜鐨勫璞°?br />閭d箞榪欓噷灝遍渶瑕佹垜浠樉寮忕殑涓哄竷灞new鎿嶄綔絎﹀垱寤虹殑瀵硅薄璋冪敤鏋愭瀯鍑芥暟銆傛甯告儏鍐典笅灝嗚嚜鍔ㄨ皟鐢ㄦ瀽鏋勫嚱鏁幫紝<font color="#ff0000">榪欐槸闇瑕佹樉紺鴻皟鐢ㄦ瀽鏋勫嚱鏁扮殑灝戞暟鍑犵鎯呭喌涔嬩竴銆?/font><br />鏄懼紡璋冪敤鏋愭瀯鍑芥暟鏃訛紝蹇呴』鎸囧畾瑕侀攢姣佺殑瀵硅薄銆傜敱浜庢湁鎸囧悜瀵硅薄鐨勬寚閽堬紝鍥犳鍙互榪欐牱鍐欙細</p> <div style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 95%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid"> <div> <span id="_162_532_Open_Text"> <span style="COLOR: #000000">pc3->~JustTesting();<br />pc1->~JustTesting();</span> </span> </div> </div> <p>鎶婅繖孌典唬鐮佹斁鍒?span class="Code">delete [] buffer;</span>涔嬪墠錛岃繖孌電▼搴忔墠綆楀畬鏁存棤閿欍?/p> <p>鍙傝冧功綾嶏細C++PrimerPlus author:Stephen Prata<br /></p> <img src ="http://www.shnenglu.com/firehutter/aggbug/13107.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/firehutter/" target="_blank">鐖變笂闈掕彍鐨勫寘瀛?/a> 2006-09-28 14:42 <a href="http://www.shnenglu.com/firehutter/archive/2006/09/28/13107.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>C++瀛︿範絎旇錛氬湪鏋勯犲嚱鏁頒腑浣跨敤new鏃跺簲娉ㄦ剰鐨勪簨欏?/title><link>http://www.shnenglu.com/firehutter/archive/2006/09/28/13106.html</link><dc:creator>鐖變笂闈掕彍鐨勫寘瀛?/dc:creator><author>鐖變笂闈掕彍鐨勫寘瀛?/author><pubDate>Thu, 28 Sep 2006 06:41:00 GMT</pubDate><guid>http://www.shnenglu.com/firehutter/archive/2006/09/28/13106.html</guid><wfw:comment>http://www.shnenglu.com/firehutter/comments/13106.html</wfw:comment><comments>http://www.shnenglu.com/firehutter/archive/2006/09/28/13106.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.shnenglu.com/firehutter/comments/commentRss/13106.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/firehutter/services/trackbacks/13106.html</trackback:ping><description><![CDATA[ <p>鍦ㄤ嬌鐢╪ew鏉ュ垵濮嬪寲瀵硅薄鐨勬寚閽堟垚鍛樻椂蹇呴』鐗瑰埆灝忓績錛屼互涓嬫槸鍑犵偣娉ㄦ剰浜嬮」錛?/p> <ul> <li>濡傛灉鍦ㄦ瀯閫犲嚱鏁頒腑浣跨敤new鏉ュ垵濮嬪寲鎸囬拡鎴愬憳錛屽垯搴斿湪鏋愭瀯鍑芥暟涓嬌鐢╠elete銆? </li> <li>new鍜宒elete蹇呴』鐩鎬簰鍏煎銆俷ew瀵瑰簲浜巇elete錛宯ew[]瀵瑰簲浜巇elete[]銆? </li> <li>濡傛灉鏈夊涓瀯閫犲嚱鏁幫紝鍒欏繀欏諱互鐩稿悓鐨勬柟寮忎嬌鐢╪ew錛岃涔堥兘甯︿腑鎷彿錛岃涔堥兘涓嶅甫銆傚洜涓哄彧鏈変竴涓瀽鏋勫嚱鏁幫紝鍥犳鎵鏈夌殑鏋勯犲嚱鏁伴兘蹇呴』涓庡畠鍏煎銆?font color="#ff0000">涓嶈繃鍙互鍦ㄤ竴涓瀯閫犲嚱鏁頒腑浣跨敤new鏉ュ垵濮嬪寲鎸囬拡錛岃屽湪鍙﹀涓涓瀯閫犲嚱鏁頒腑灝嗘寚閽堝垵濮嬪寲涓虹┖錛圢ull鎴?錛夛紝榪欐槸鍥犱負delete錛堟棤璁烘槸甯︿腑鎷彿榪樻槸涓嶅甫涓嫭鍙鳳級鍙互鐢ㄤ簬絀烘寚閽堛?/font></li> </ul> <img src ="http://www.shnenglu.com/firehutter/aggbug/13106.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/firehutter/" target="_blank">鐖變笂闈掕彍鐨勫寘瀛?/a> 2006-09-28 14:41 <a href="http://www.shnenglu.com/firehutter/archive/2006/09/28/13106.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>C++瀛︿範絎旇錛欳++綾誨拰鍔ㄦ佸唴瀛樺垎閰嶄腑鍏充簬澶嶅埗鏋勯犲嚱鏁板拰璧嬪兼搷浣滅http://www.shnenglu.com/firehutter/archive/2006/09/28/13103.html鐖變笂闈掕彍鐨勫寘瀛?/dc:creator>鐖變笂闈掕彍鐨勫寘瀛?/author>Thu, 28 Sep 2006 06:33:00 GMThttp://www.shnenglu.com/firehutter/archive/2006/09/28/13103.htmlhttp://www.shnenglu.com/firehutter/comments/13103.htmlhttp://www.shnenglu.com/firehutter/archive/2006/09/28/13103.html#Feedback0http://www.shnenglu.com/firehutter/comments/commentRss/13103.htmlhttp://www.shnenglu.com/firehutter/services/trackbacks/13103.html渚嬪鏈変互涓媍lass錛?/p>
    class 聽StringBad
    {
    聽聽聽聽
    private :
    聽聽聽聽聽聽聽聽
    char * 聽str;
    聽聽聽聽聽聽聽聽
    int 聽len;
    聽聽聽聽聽聽聽聽聽
    聽聽聽聽
    public :
    聽聽聽聽聽聽聽聽StringBad(
    const char * 聽s);
    聽聽聽聽聽聽聽聽StringBad();
    聽聽聽聽聽聽聽聽
    ~ StringBad();
    聽聽聽聽聽聽聽聽
    }
    ;

    鍦ㄦ瀯閫犲嚱鏁板拰鏋愭瀯鍑芥暟瀹氫箟褰撲腑鏈夊涓嬪畾涔夛細

    StringBad::StringBad( const char * 聽s)
    {
    聽聽聽聽len聽
    = 聽std::strlen(s);
    聽聽聽聽str聽
    = new char 聽[len聽 + 1 ];
    聽聽聽聽
    }


    StringBad::StringBad()
    {
    聽聽聽聽len聽
    = 4 聽;
    聽聽聽聽str聽
    = new char [ 4 ];
    聽聽聽聽
    }


    StringBad::
    ~ StringBad()
    {
    聽聽聽聽
    聽聽聽聽delete聽[]聽str;
    }

    閭d箞鍦ㄧ▼搴忓綋涓鏋滄湁浠ヤ笅浠g爜錛?/p>

    StringBad聽sports( " Spinach聽Leaves聽Bow1聽for聽bollars " );
    StringBad聽sailor聽
    = 聽sports;

    浠ヤ笂鐨勭浜屾潯鍒濆鍖栬鍙ュ皢浼氳皟鐢ㄤ粈涔堟瀯閫犲嚱鏁幫紵璁頒綇錛岃繖縐嶅艦寮忕殑鍒濆鍖栫瓑鏁堜簬涓嬮潰鐨勮鍙ワ細

    StringBad聽sailor聽 = 聽StringBad(sports);

    鍥犱負sports鐨勭被鍨嬩負StringBad錛屽洜姝ょ浉搴旂殑鏋勯犲嚱鏁板師鍨嬪簲璇ュ涓嬶細

    StringBad( const 聽StringBad聽 & );

    褰撴垜浠嬌鐢ㄤ竴涓璞℃潵鍒濆鍖栧彟涓涓璞℃椂錛岀紪璇戝櫒灝嗚嚜鍔ㄧ敓鎴愪笂榪版瀯閫犲嚱鏁幫紙縐頒負澶嶅埗鏋勯犲嚱鏁幫紝鍥犱負瀹冨垱寤哄璞$殑涓涓壇鏈級銆?br />鐜板湪鎴戜滑涓嶅Θ鎬葷粨涓涓嬫墍璋撶殑闅愬紡鎴愬憳鍑芥暟錛屽嵆C++鑷姩鎻愪緵浜嗕互涓嬭繖浜涙垚鍛樺嚱鏁幫細

    • 榛樿鏋勯犲嚱鏁幫紝濡傛灉娌℃湁瀹氫箟鏋勯犲嚱鏁般?
    • 澶嶅埗鏋勯犲嚱鏁幫紝濡傛灉娌℃湁瀹氫箟銆?
    • 璧嬪兼搷浣滅錛屽鏋滄病鏈夊畾涔夈?
    • 榛樿鏋愭瀯鍑芥暟錛屽鏋滄病鏈夊畾涔夈?
    • 鍦板潃鎿嶄綔絎︼紝濡傛灉娌℃湁瀹氫箟銆?

    鐜板湪鎴戜滑鏉ョ湅鐪嬫垜浠病鏈夊畾涔夊鍒舵瀯閫犲嚱鏁扮殑鎯呭喌涓嬭皟鐢ㄩ殣寮忓鍒舵瀯閫犲嚱鏁板皢浼氬嚭鐜頒粈涔堟儏鍐點?br />浠庢瀯閫犲嚱鏁板畾涔夌殑浠g爜鐗囨柇鍙互鐪嬪埌錛屽綋涓嬌鐢╪ew鎿嶄綔絎﹀垵濮嬪寲浜嗕竴涓寚閽坰tr錛岃岄殣寮忕殑澶嶅埗鏋勯犲嚱鏁版槸鎸夊艱繘琛屽鍒剁殑錛岄偅涔堝浜庢寚閽坰tr錛屽皢浼氳繘琛屽涓嬪鍒訛細

    sailor.str聽 = 聽sports.str;

    榪欓噷澶嶅埗鐨勪笉鏄瓧絎︿覆錛岃屾槸涓涓寚鍚戝瓧絎︿覆鐨勬寚閽堬紒涔熷氨鏄錛屾垜浠皢寰楀埌涓や釜鎸囧悜鍚屼竴涓瓧絎︿覆鐨勬寚閽堬紒鐢辨浼氫駭鐢熺殑闂灝嗕笉璦鑰屽柣銆傚綋鍏朵腑涓涓璞¤皟鐢ㄤ簡鏋愭瀯鍑芥暟涔嬪悗錛屽叾str鎸囧悜鐨勫唴瀛樺皢琚噴鏀撅紝榪欎釜鏃跺欐垜浠鏋滆皟鐢ㄥ彟涓涓璞★紝鍏秙tr鎸囧悜鐨勫湴鍧鏁版嵁浼氭槸浠涔堬紵寰堟槑鏄懼皢浼氬嚭鐜頒笉鍙鏂欑殑緇撴灉銆?/p>

    鎵浠ョ敱姝ゅ彲瑙侊紝濡傛灉綾諱腑鍖呭惈浜嗕嬌鐢╪ew鍒濆鍖栫殑鎸囬拡鎴愬憳錛屽簲褰撳畾涔変竴涓鍒舵瀯閫犲嚱鏁幫紝浠ュ鍒舵寚鍚戠殑鏁版嵁錛岃屼笉鏄寚閽堬紝榪欒縐頒負娣卞害澶嶅埗銆傚洜涓洪粯璁ょ殑嫻呭鍒訛紙鎴栨垚涓烘垚鍛樺鍒訛級浠呮祬嫻呯殑璧嬪兼寚閽堜俊鎭?/strong>

    鎴戜滑鍐嶇湅浠ヤ笅浠g爜鐗囨柇錛屾垜浠◢鍋氫慨鏀癸細

    StringBad聽headline1( " Celery聽Stalks聽at聽Midnight " );
    StringBad聽knot;
    knot聽
    = 聽headline1;

    榪欓噷鐨勬渶鍚庝竴琛屽皢涓庝互涓婁緥瀛愭湁鎵鍖哄埆錛岀幇鍦ㄦ槸灝嗗凡鏈夊璞¤祴緇欏彟涓涓凡鏈夊璞★紝榪欏皢浼氶噰鍙栧叾浠栨搷浣滐紝鍗充嬌鐢ㄩ噸杞界殑璧嬪兼搷浣滅銆傦紙鎴戜滑闇瑕佺煡閬撶殑鏄細鍒濆鍖栨繪槸浼氳皟鐢ㄥ鍒舵瀯閫犲嚱鏁幫紝鑰屼嬌鐢?鎿嶄綔絎︽椂涔熷彲鑳借皟鐢ㄨ祴鍊兼搷浣滅錛夊洜涓篊++鍏佽瀵硅薄璧嬪鹼紝榪欐槸閫氳繃鑷姩涓虹被閲嶈澆璧嬪兼搷浣滅瀹炵幇鐨勩傚叾鍘熷瀷濡備笅錛?/p>

    Class_name聽 & 聽Class_name:: operator = 聽( const 聽Class_name聽 & );

    瀹冩帴鍙楀茍榪斿洖涓涓寚鍚戠被瀵硅薄鐨勫紩鐢ㄣ?br />涓庨殣寮忕殑澶嶅埗鏋勯犲嚱鏁頒竴鏍鳳紝闅愬紡鐨勫璞¤祴鍊兼搷浣滅涔熶細浜х敓鍚屾牱鐨勯棶棰橈紝鍗沖寘鍚簡浣跨敤new鍒濆鍖栫殑鎸囬拡鎴愬憳鏃訛紝鍙細閲囩敤嫻呭鍒躲傛墍浠ユ垜浠渶瑕佷嬌鐢ㄥ悓鏍風殑瑙e喅鍔炴硶錛?strong>鍗沖畾涔変竴涓噸杞界殑璧嬪兼搷浣滅鏉ュ疄鐜版繁搴﹀鍒躲?/strong>

    鎵浠ョ患涓婃墍榪幫紝濡傛灉綾諱腑鍖呭惈浜嗕嬌鐢╪ew鍒濆鍖栫殑鎸囬拡鎴愬憳錛屾垜浠簲璇ユ樉寮忓畾涔変竴涓鍒舵瀯閫犲嚱鏁板拰涓涓噸杞界殑璧嬪兼搷浣滅鏉ュ疄鐜板叾娣卞害澶嶅埗錛岄伩鍏嶇敱姝ゅ甫鏉ョ殑鎴愬憳澶嶅埗闂

    鍙傝冧功綾嶏細C++PrimerPlus author:Stephen Prata



    ]]>
    鍏充簬C++瀛︿範絎旇http://www.shnenglu.com/firehutter/archive/2006/09/28/13102.html鐖變笂闈掕彍鐨勫寘瀛?/dc:creator>鐖變笂闈掕彍鐨勫寘瀛?/author>Thu, 28 Sep 2006 06:23:00 GMThttp://www.shnenglu.com/firehutter/archive/2006/09/28/13102.htmlhttp://www.shnenglu.com/firehutter/comments/13102.htmlhttp://www.shnenglu.com/firehutter/archive/2006/09/28/13102.html#Feedback1http://www.shnenglu.com/firehutter/comments/commentRss/13102.htmlhttp://www.shnenglu.com/firehutter/services/trackbacks/13102.html絎旇涓弬鑰冧簡涓浜涗功綾嶄腑鐨勮寖渚嬪拰涓浜涜鏄庛傞兘鏄嚜宸卞涔犺繃紼嬩腑鏁寸悊鍑烘潵鐨勶紝涓昏鐩殑鏄粰鑷繁鏃ュ悗鍙傝冦?img src ="http://www.shnenglu.com/firehutter/aggbug/13102.html" width = "1" height = "1" />

    ]]>
    亚洲精品国产美女久久久| 久久嫩草影院免费看夜色| 国产精品美女久久久久| 亚洲va中文字幕无码久久 | 国产精品久久午夜夜伦鲁鲁| 麻豆久久久9性大片| 无夜精品久久久久久| 精品久久亚洲中文无码| 久久中文字幕人妻丝袜| 久久久久97国产精华液好用吗| 婷婷久久五月天| 99久久99久久精品国产片果冻| 香蕉久久av一区二区三区| 中文无码久久精品| 久久99精品国产自在现线小黄鸭| 久久精品国产亚洲精品2020| 久久久久亚洲AV成人网| 合区精品久久久中文字幕一区 | 久久久久亚洲精品无码蜜桃| 成人资源影音先锋久久资源网| 亚洲AV无码久久精品色欲| 久久亚洲国产成人精品性色| 久久久久亚洲精品无码蜜桃| 久久婷婷国产麻豆91天堂| 亚洲性久久久影院| 亚洲中文字幕无码久久精品1| 国产∨亚洲V天堂无码久久久| 久久久久99精品成人片三人毛片| 热久久最新网站获取| 精品熟女少妇av免费久久| 国产精品99久久久久久宅男| 亚洲日韩中文无码久久| 国产精品成人无码久久久久久| 久久综合亚洲鲁鲁五月天| 久久国产精品久久国产精品| 9999国产精品欧美久久久久久| 99精品久久精品一区二区| 久久亚洲国产成人影院网站| 精品久久久久久久久中文字幕| 久久人人爽人人爽人人片AV高清| 精品精品国产自在久久高清|