锘??xml version="1.0" encoding="utf-8" standalone="yes"?>日韩欧美亚洲国产精品字幕久久久 ,少妇熟女久久综合网色欲,久久久久免费精品国产http://www.shnenglu.com/qingbizhu/category/19096.html鏃犺鏄お闃充笅錛岃繕鏄闆ㄤ腑錛岄兘瑕佹垚闀匡紒zh-cnWed, 11 Apr 2012 17:45:47 GMTWed, 11 Apr 2012 17:45:47 GMT60Singleton妯″紡鈥斺擟++搴旂敤錛堝洓錛?http://www.shnenglu.com/qingbizhu/archive/2012/03/14/167826.html闈掔ⅶ绔?/dc:creator>闈掔ⅶ绔?/author>Tue, 13 Mar 2012 17:07:00 GMThttp://www.shnenglu.com/qingbizhu/archive/2012/03/14/167826.htmlhttp://www.shnenglu.com/qingbizhu/comments/167826.htmlhttp://www.shnenglu.com/qingbizhu/archive/2012/03/14/167826.html#Feedback0http://www.shnenglu.com/qingbizhu/comments/commentRss/167826.htmlhttp://www.shnenglu.com/qingbizhu/services/trackbacks/167826.html闃呰鍏ㄦ枃

]]>
Singleton妯″紡鈥斺擟++搴旂敤錛堜笁錛?/title><link>http://www.shnenglu.com/qingbizhu/archive/2012/03/13/167745.html</link><dc:creator>闈掔ⅶ绔?/dc:creator><author>闈掔ⅶ绔?/author><pubDate>Mon, 12 Mar 2012 16:55:00 GMT</pubDate><guid>http://www.shnenglu.com/qingbizhu/archive/2012/03/13/167745.html</guid><wfw:comment>http://www.shnenglu.com/qingbizhu/comments/167745.html</wfw:comment><comments>http://www.shnenglu.com/qingbizhu/archive/2012/03/13/167745.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/qingbizhu/comments/commentRss/167745.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/qingbizhu/services/trackbacks/167745.html</trackback:ping><description><![CDATA[     鎽樿: 鍓嶉潰瀵笴++鐨凷ingleton妯″紡鐨勬帰璁ㄨ繕閮芥槸閽堝閫氳繃闈欐佸彉閲忔潵鍒涘緩瀵硅薄銆備絾瀛︿範鍢涳紝澶氳蛋鐐規(guī)諱笉鏄潖浜嬨?鎺ヤ笅鏉ュ氨鏉ョ湅鐪嬮氳繃 new 鏉ュ垱寤哄崟浠跺璞$殑鍗曚歡綾昏璁°傛棦鐒舵槸鐢?new 鏉ュ垱寤轟簡錛岄偅鑷劧灝變笉鑳藉拷鐣ラ渶瑕佺敤 delete 鏉ラ噴鏀俱?濂戒簡錛屽厛鏉ョ湅鐪嬩唬鐮侊細 Code highlighting produced by Actipro CodeHighlighter (freeware)htt...  <a href='http://www.shnenglu.com/qingbizhu/archive/2012/03/13/167745.html'>闃呰鍏ㄦ枃</a><img src ="http://www.shnenglu.com/qingbizhu/aggbug/167745.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/qingbizhu/" target="_blank">闈掔ⅶ绔?/a> 2012-03-13 00:55 <a href="http://www.shnenglu.com/qingbizhu/archive/2012/03/13/167745.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Singleton妯″紡鈥斺擟++搴旂敤錛堜簩錛?/title><link>http://www.shnenglu.com/qingbizhu/archive/2012/03/12/167682.html</link><dc:creator>闈掔ⅶ绔?/dc:creator><author>闈掔ⅶ绔?/author><pubDate>Sun, 11 Mar 2012 18:08:00 GMT</pubDate><guid>http://www.shnenglu.com/qingbizhu/archive/2012/03/12/167682.html</guid><wfw:comment>http://www.shnenglu.com/qingbizhu/comments/167682.html</wfw:comment><comments>http://www.shnenglu.com/qingbizhu/archive/2012/03/12/167682.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/qingbizhu/comments/commentRss/167682.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/qingbizhu/services/trackbacks/167682.html</trackback:ping><description><![CDATA[<p>鐪嬩簡閫氳繃闈欐佹垚鍛樺疄鐜扮殑鎯版у崟浠訛紝铏借鏋勪歡綆鍗曚笖綰跨▼瀹夊叏錛屼絾鍦ㄨ鍏ㄥ眬鍙橀噺錛堝寘鎷潤鎬佸叏灞鍙橀噺錛夌殑鏋勯犳垨鏋愭瀯璋冪敤鏃訛紝浼氬瓨鍦ㄧ潃閭f牱鐨勭己闄鋒瘯绔熻繕鏄緢璁╀漢涓嶇埥銆傞偅涔堬紝鏄惁瀛樺湪淇濇寔涓婇潰鐨勪紭鐐瑰悓鏃跺墧闄や簡涓婇潰鐨勭己闄風殑C++鍗曚歡鍛紵</p> <p> </p> <p>鎴戜滑鐭ラ亾錛屽畾涔変簬鍑芥暟鍐呴儴鐨勯潤鎬佸眬閮ㄥ彉閲忥紝鏈夌潃</p> <ul><li>瀹氫箟鐨勫疄鏃舵э紝鍗沖彧鍦ㄥ嚱鏁扮涓嬈¤璋冪敤鏃舵墠琚畾涔?/li><li>綰跨▼瀹夊叏鎬?/li><li>鐢熷懡鏈熺洿鍒扮▼搴忕粨鏉?/li></ul> <p>鐨勭壒鐐廣傞偅涔堬紝閫氳繃榪欎釜灞閮ㄩ潤鎬佸彉閲忔潵鍒涘緩鐨勫崟浠跺張浼氭槸浠涔堟牱鍛紵璐翠笂鎴戠殑Demo浠g爜錛岃繖灝辨潵鐪嬬湅鍚с?/p> <div style="border-bottom: #cccccc 1px solid; border-left: #cccccc 1px solid; padding-bottom: 4px; background-color: #eeeeee; padding-left: 4px; width: 98%; padding-right: 5px; font-size: 13px; word-break: break-all; border-top: #cccccc 1px solid; border-right: #cccccc 1px solid; padding-top: 4px"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #008080">  1</span><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" /><span style="color: #008000">//</span><span style="color: #008000"> Singleton demo_1: Singleton instance is a local static varible of class.</span><span style="color: #008000"><br /></span><span style="color: #008080">  2</span><span style="color: #008000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" /></span><span style="color: #000000"><br /></span><span style="color: #008080">  3</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" />#include </span><span style="color: #000000"><</span><span style="color: #000000">Windows.h</span><span style="color: #000000">></span><span style="color: #000000"><br /></span><span style="color: #008080">  4</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" />#include </span><span style="color: #000000"><</span><span style="color: #000000">iostream</span><span style="color: #000000">></span><span style="color: #000000"><br /></span><span style="color: #008080">  5</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" /><br /></span><span style="color: #008080">  6</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" /></span><span style="color: #0000ff">class</span><span style="color: #000000"> A <br /></span><span style="color: #008080">  7</span><span style="color: #000000"><img id="Codehighlighter1_128_602_Open_Image" onclick="this.style.display='none'; Codehighlighter1_128_602_Open_Text.style.display='none'; Codehighlighter1_128_602_Closed_Image.style.display='inline'; Codehighlighter1_128_602_Closed_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif"><img style="display: none" id="Codehighlighter1_128_602_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_128_602_Closed_Text.style.display='none'; Codehighlighter1_128_602_Open_Image.style.display='inline'; Codehighlighter1_128_602_Open_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif"></span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_128_602_Closed_Text"><img alt="" src="http://www.shnenglu.com/Images/dot.gif" /></span><span id="Codehighlighter1_128_602_Open_Text"><span style="color: #000000">{<br /></span><span style="color: #008080">  8</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" /></span><span style="color: #0000ff">public</span><span style="color: #000000">:<br /></span><span style="color: #008080">  9</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />    </span><span style="color: #0000ff">static</span><span style="color: #000000"> A</span><span style="color: #000000">&</span><span style="color: #000000"> GetInstance();<br /></span><span style="color: #008080"> 10</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" /><br /></span><span style="color: #008080"> 11</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" /></span><span style="color: #0000ff">private</span><span style="color: #000000">:<br /></span><span style="color: #008080"> 12</span><span style="color: #000000"><img id="Codehighlighter1_208_286_Open_Image" onclick="this.style.display='none'; Codehighlighter1_208_286_Open_Text.style.display='none'; Codehighlighter1_208_286_Closed_Image.style.display='inline'; Codehighlighter1_208_286_Closed_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none" id="Codehighlighter1_208_286_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_208_286_Closed_Text.style.display='none'; Codehighlighter1_208_286_Open_Image.style.display='inline'; Codehighlighter1_208_286_Open_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif">    A() : m_nStat1(</span><span style="color: #000000">-</span><span style="color: #000000">1</span><span style="color: #000000">), m_nStat2(</span><span style="color: #000000">-</span><span style="color: #000000">1</span><span style="color: #000000">) </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_208_286_Closed_Text"><img alt="" src="http://www.shnenglu.com/Images/dot.gif" /></span><span id="Codehighlighter1_208_286_Open_Text"><span style="color: #000000">{<br /></span><span style="color: #008080"> 13</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />        m_nStat1 </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">0</span><span style="color: #000000">;<br /></span><span style="color: #008080"> 14</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />        std::cout </span><span style="color: #000000"><<</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">Construct A</span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000"><<</span><span style="color: #000000"> std::endl;<br /></span><span style="color: #008080"> 15</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />        m_nStat2 </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">0</span><span style="color: #000000">;<br /></span><span style="color: #008080"> 16</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" />    }</span></span><span style="color: #000000"><br /></span><span style="color: #008080"> 17</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />    A(</span><span style="color: #0000ff">const</span><span style="color: #000000"> A</span><span style="color: #000000">&</span><span style="color: #000000">);<br /></span><span style="color: #008080"> 18</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" /><br /></span><span style="color: #008080"> 19</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" /></span><span style="color: #0000ff">public</span><span style="color: #000000">:<br /></span><span style="color: #008080"> 20</span><span style="color: #000000"><img id="Codehighlighter1_317_394_Open_Image" onclick="this.style.display='none'; Codehighlighter1_317_394_Open_Text.style.display='none'; Codehighlighter1_317_394_Closed_Image.style.display='inline'; Codehighlighter1_317_394_Closed_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none" id="Codehighlighter1_317_394_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_317_394_Closed_Text.style.display='none'; Codehighlighter1_317_394_Open_Image.style.display='inline'; Codehighlighter1_317_394_Open_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif">    </span><span style="color: #000000">~</span><span style="color: #000000">A() </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_317_394_Closed_Text"><img alt="" src="http://www.shnenglu.com/Images/dot.gif" /></span><span id="Codehighlighter1_317_394_Open_Text"><span style="color: #000000">{<br /></span><span style="color: #008080"> 21</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />        m_nStat1 </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">0</span><span style="color: #000000">;<br /></span><span style="color: #008080"> 22</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />        std::cout </span><span style="color: #000000"><<</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">Destruct A</span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000"><<</span><span style="color: #000000"> std::endl;<br /></span><span style="color: #008080"> 23</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />        m_nStat2 </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">0</span><span style="color: #000000">;<br /></span><span style="color: #008080"> 24</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" />    }</span></span><span style="color: #000000"><br /></span><span style="color: #008080"> 25</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" /><br /></span><span style="color: #008080"> 26</span><span style="color: #000000"><img id="Codehighlighter1_408_560_Open_Image" onclick="this.style.display='none'; Codehighlighter1_408_560_Open_Text.style.display='none'; Codehighlighter1_408_560_Closed_Image.style.display='inline'; Codehighlighter1_408_560_Closed_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none" id="Codehighlighter1_408_560_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_408_560_Closed_Text.style.display='none'; Codehighlighter1_408_560_Open_Image.style.display='inline'; Codehighlighter1_408_560_Open_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif">    </span><span style="color: #0000ff">void</span><span style="color: #000000"> Do() </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_408_560_Closed_Text"><img alt="" src="http://www.shnenglu.com/Images/dot.gif" /></span><span id="Codehighlighter1_408_560_Open_Text"><span style="color: #000000">{<br /></span><span style="color: #008080"> 27</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />        </span><span style="color: #000000">++</span><span style="color: #000000">m_nStat1;<br /></span><span style="color: #008080"> 28</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />        </span><span style="color: #000000">++</span><span style="color: #000000">m_nStat2;<br /></span><span style="color: #008080"> 29</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />        std::cout </span><span style="color: #000000"><<</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">Called Do() by object of A. [</span><span style="color: #000000">"</span><span style="color: #000000"> <br /></span><span style="color: #008080"> 30</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />                  </span><span style="color: #000000"><<</span><span style="color: #000000"> m_nStat1 </span><span style="color: #000000"><<</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">, </span><span style="color: #000000">"</span><span style="color: #000000"> <br /></span><span style="color: #008080"> 31</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />                  </span><span style="color: #000000"><<</span><span style="color: #000000"> m_nStat2 </span><span style="color: #000000"><<</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">]</span><span style="color: #000000">"</span><span style="color: #000000"> <br /></span><span style="color: #008080"> 32</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />                  </span><span style="color: #000000"><<</span><span style="color: #000000"> std::endl;<br /></span><span style="color: #008080"> 33</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" />    }</span></span><span style="color: #000000"><br /></span><span style="color: #008080"> 34</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" /><br /></span><span style="color: #008080"> 35</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" /></span><span style="color: #0000ff">private</span><span style="color: #000000">:<br /></span><span style="color: #008080"> 36</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />    </span><span style="color: #0000ff">int</span><span style="color: #000000"> m_nStat1;<br /></span><span style="color: #008080"> 37</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />    </span><span style="color: #0000ff">int</span><span style="color: #000000"> m_nStat2;<br /></span><span style="color: #008080"> 38</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" />}</span></span><span style="color: #000000">;<br /></span><span style="color: #008080"> 39</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" /><br /></span><span style="color: #008080"> 40</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" /></span><span style="color: #0000ff">class</span><span style="color: #000000"> B<br /></span><span style="color: #008080"> 41</span><span style="color: #000000"><img id="Codehighlighter1_614_844_Open_Image" onclick="this.style.display='none'; Codehighlighter1_614_844_Open_Text.style.display='none'; Codehighlighter1_614_844_Closed_Image.style.display='inline'; Codehighlighter1_614_844_Closed_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif"><img style="display: none" id="Codehighlighter1_614_844_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_614_844_Closed_Text.style.display='none'; Codehighlighter1_614_844_Open_Image.style.display='inline'; Codehighlighter1_614_844_Open_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif"></span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_614_844_Closed_Text"><img alt="" src="http://www.shnenglu.com/Images/dot.gif" /></span><span id="Codehighlighter1_614_844_Open_Text"><span style="color: #000000">{<br /></span><span style="color: #008080"> 42</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" /></span><span style="color: #0000ff">public</span><span style="color: #000000">:<br /></span><span style="color: #008080"> 43</span><span style="color: #000000"><img id="Codehighlighter1_649_731_Open_Image" onclick="this.style.display='none'; Codehighlighter1_649_731_Open_Text.style.display='none'; Codehighlighter1_649_731_Closed_Image.style.display='inline'; Codehighlighter1_649_731_Closed_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none" id="Codehighlighter1_649_731_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_649_731_Closed_Text.style.display='none'; Codehighlighter1_649_731_Open_Image.style.display='inline'; Codehighlighter1_649_731_Open_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif">    B(</span><span style="color: #0000ff">int</span><span style="color: #000000"> nID) : m_nID(nID) </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_649_731_Closed_Text"><img alt="" src="http://www.shnenglu.com/Images/dot.gif" /></span><span id="Codehighlighter1_649_731_Open_Text"><span style="color: #000000">{<br /></span><span style="color: #008080"> 44</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />        std::cout </span><span style="color: #000000"><<</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">Construct B: </span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000"><<</span><span style="color: #000000"> m_nID </span><span style="color: #000000"><<</span><span style="color: #000000"> std::endl;<br /></span><span style="color: #008080"> 45</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />        A::GetInstance().Do();<br /></span><span style="color: #008080"> 46</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" />    }</span></span><span style="color: #000000"><br /></span><span style="color: #008080"> 47</span><span style="color: #000000"><img id="Codehighlighter1_739_820_Open_Image" onclick="this.style.display='none'; Codehighlighter1_739_820_Open_Text.style.display='none'; Codehighlighter1_739_820_Closed_Image.style.display='inline'; Codehighlighter1_739_820_Closed_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none" id="Codehighlighter1_739_820_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_739_820_Closed_Text.style.display='none'; Codehighlighter1_739_820_Open_Image.style.display='inline'; Codehighlighter1_739_820_Open_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif">    </span><span style="color: #000000">~</span><span style="color: #000000">B() </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_739_820_Closed_Text"><img alt="" src="http://www.shnenglu.com/Images/dot.gif" /></span><span id="Codehighlighter1_739_820_Open_Text"><span style="color: #000000">{<br /></span><span style="color: #008080"> 48</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />        std::cout </span><span style="color: #000000"><<</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">Destruct B: </span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000"><<</span><span style="color: #000000"> m_nID </span><span style="color: #000000"><<</span><span style="color: #000000"> std::endl;<br /></span><span style="color: #008080"> 49</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />        A::GetInstance().Do();<br /></span><span style="color: #008080"> 50</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" />    }</span></span><span style="color: #000000"><br /></span><span style="color: #008080"> 51</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" /><br /></span><span style="color: #008080"> 52</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" /></span><span style="color: #0000ff">private</span><span style="color: #000000">:<br /></span><span style="color: #008080"> 53</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />    </span><span style="color: #0000ff">int</span><span style="color: #000000"> m_nID;<br /></span><span style="color: #008080"> 54</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" />}</span></span><span style="color: #000000">;<br /></span><span style="color: #008080"> 55</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" /><br /></span><span style="color: #008080"> 56</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" /></span><span style="color: #0000ff">class</span><span style="color: #000000"> C<br /></span><span style="color: #008080"> 57</span><span style="color: #000000"><img id="Codehighlighter1_856_1216_Open_Image" onclick="this.style.display='none'; Codehighlighter1_856_1216_Open_Text.style.display='none'; Codehighlighter1_856_1216_Closed_Image.style.display='inline'; Codehighlighter1_856_1216_Closed_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif"><img style="display: none" id="Codehighlighter1_856_1216_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_856_1216_Closed_Text.style.display='none'; Codehighlighter1_856_1216_Open_Image.style.display='inline'; Codehighlighter1_856_1216_Open_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif"></span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_856_1216_Closed_Text"><img alt="" src="http://www.shnenglu.com/Images/dot.gif" /></span><span id="Codehighlighter1_856_1216_Open_Text"><span style="color: #000000">{<br /></span><span style="color: #008080"> 58</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" /></span><span style="color: #0000ff">public</span><span style="color: #000000">:<br /></span><span style="color: #008080"> 59</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />    </span><span style="color: #0000ff">static</span><span style="color: #000000"> C</span><span style="color: #000000">&</span><span style="color: #000000"> GetInstance();<br /></span><span style="color: #008080"> 60</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" /><br /></span><span style="color: #008080"> 61</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" /></span><span style="color: #0000ff">private</span><span style="color: #000000">:<br /></span><span style="color: #008080"> 62</span><span style="color: #000000"><img id="Codehighlighter1_921_982_Open_Image" onclick="this.style.display='none'; Codehighlighter1_921_982_Open_Text.style.display='none'; Codehighlighter1_921_982_Closed_Image.style.display='inline'; Codehighlighter1_921_982_Closed_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none" id="Codehighlighter1_921_982_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_921_982_Closed_Text.style.display='none'; Codehighlighter1_921_982_Open_Image.style.display='inline'; Codehighlighter1_921_982_Open_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif">    C() : m_nStat(</span><span style="color: #000000">-</span><span style="color: #000000">1</span><span style="color: #000000">) </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_921_982_Closed_Text"><img alt="" src="http://www.shnenglu.com/Images/dot.gif" /></span><span id="Codehighlighter1_921_982_Open_Text"><span style="color: #000000">{<br /></span><span style="color: #008080"> 63</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />        std::cout </span><span style="color: #000000"><<</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">Construct C</span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000"><<</span><span style="color: #000000"> std::endl;<br /></span><span style="color: #008080"> 64</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />        m_nStat </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">0</span><span style="color: #000000">;<br /></span><span style="color: #008080"> 65</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" />    }</span></span><span style="color: #000000"><br /></span><span style="color: #008080"> 66</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />    C(</span><span style="color: #0000ff">const</span><span style="color: #000000"> C</span><span style="color: #000000">&</span><span style="color: #000000">);<br /></span><span style="color: #008080"> 67</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" /><br /></span><span style="color: #008080"> 68</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" /></span><span style="color: #0000ff">public</span><span style="color: #000000">:<br /></span><span style="color: #008080"> 69</span><span style="color: #000000"><img id="Codehighlighter1_1013_1073_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1013_1073_Open_Text.style.display='none'; Codehighlighter1_1013_1073_Closed_Image.style.display='inline'; Codehighlighter1_1013_1073_Closed_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none" id="Codehighlighter1_1013_1073_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_1013_1073_Closed_Text.style.display='none'; Codehighlighter1_1013_1073_Open_Image.style.display='inline'; Codehighlighter1_1013_1073_Open_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif">    </span><span style="color: #000000">~</span><span style="color: #000000">C() </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_1013_1073_Closed_Text"><img alt="" src="http://www.shnenglu.com/Images/dot.gif" /></span><span id="Codehighlighter1_1013_1073_Open_Text"><span style="color: #000000">{<br /></span><span style="color: #008080"> 70</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />        std::cout </span><span style="color: #000000"><<</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">Destruct C</span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000"><<</span><span style="color: #000000"> std::endl;<br /></span><span style="color: #008080"> 71</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />        m_nStat </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">0</span><span style="color: #000000">;<br /></span><span style="color: #008080"> 72</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" />    }</span></span><span style="color: #000000"><br /></span><span style="color: #008080"> 73</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" /><br /></span><span style="color: #008080"> 74</span><span style="color: #000000"><img id="Codehighlighter1_1087_1190_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1087_1190_Open_Text.style.display='none'; Codehighlighter1_1087_1190_Closed_Image.style.display='inline'; Codehighlighter1_1087_1190_Closed_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none" id="Codehighlighter1_1087_1190_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_1087_1190_Closed_Text.style.display='none'; Codehighlighter1_1087_1190_Open_Image.style.display='inline'; Codehighlighter1_1087_1190_Open_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif">    </span><span style="color: #0000ff">void</span><span style="color: #000000"> Do() </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_1087_1190_Closed_Text"><img alt="" src="http://www.shnenglu.com/Images/dot.gif" /></span><span id="Codehighlighter1_1087_1190_Open_Text"><span style="color: #000000">{<br /></span><span style="color: #008080"> 75</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />        </span><span style="color: #000000">++</span><span style="color: #000000">m_nStat;<br /></span><span style="color: #008080"> 76</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />        std::cout </span><span style="color: #000000"><<</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">Called Do() by object of C. [</span><span style="color: #000000">"</span><span style="color: #000000"> <br /></span><span style="color: #008080"> 77</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />            </span><span style="color: #000000"><<</span><span style="color: #000000"> m_nStat </span><span style="color: #000000"><<</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">]</span><span style="color: #000000">"</span><span style="color: #000000"> <br /></span><span style="color: #008080"> 78</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />            </span><span style="color: #000000"><<</span><span style="color: #000000"> std::endl;<br /></span><span style="color: #008080"> 79</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" />    }</span></span><span style="color: #000000"><br /></span><span style="color: #008080"> 80</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" /><br /></span><span style="color: #008080"> 81</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" /></span><span style="color: #0000ff">private</span><span style="color: #000000">:<br /></span><span style="color: #008080"> 82</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />    </span><span style="color: #0000ff">int</span><span style="color: #000000"> m_nStat;<br /></span><span style="color: #008080"> 83</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" />}</span></span><span style="color: #000000">;<br /></span><span style="color: #008080"> 84</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" /><br /></span><span style="color: #008080"> 85</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" /></span><span style="color: #0000ff">static</span><span style="color: #000000"> B gs_B0(</span><span style="color: #000000">0</span><span style="color: #000000">);<br /></span><span style="color: #008080"> 86</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" />B g_B1(</span><span style="color: #000000">1</span><span style="color: #000000">);<br /></span><span style="color: #008080"> 87</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" /><br /></span><span style="color: #008080"> 88</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" />A</span><span style="color: #000000">&</span><span style="color: #000000"> A::GetInstance()<br /></span><span style="color: #008080"> 89</span><span style="color: #000000"><img id="Codehighlighter1_1271_1317_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1271_1317_Open_Text.style.display='none'; Codehighlighter1_1271_1317_Closed_Image.style.display='inline'; Codehighlighter1_1271_1317_Closed_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif"><img style="display: none" id="Codehighlighter1_1271_1317_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_1271_1317_Closed_Text.style.display='none'; Codehighlighter1_1271_1317_Open_Image.style.display='inline'; Codehighlighter1_1271_1317_Open_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif"></span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_1271_1317_Closed_Text"><img alt="" src="http://www.shnenglu.com/Images/dot.gif" /></span><span id="Codehighlighter1_1271_1317_Open_Text"><span style="color: #000000">{<br /></span><span style="color: #008080"> 90</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />    </span><span style="color: #0000ff">static</span><span style="color: #000000"> A s_instance;<br /></span><span style="color: #008080"> 91</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />    <br /></span><span style="color: #008080"> 92</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />    </span><span style="color: #0000ff">return</span><span style="color: #000000"> s_instance;<br /></span><span style="color: #008080"> 93</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" />}</span></span><span style="color: #000000"><br /></span><span style="color: #008080"> 94</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" /><br /></span><span style="color: #008080"> 95</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" />C</span><span style="color: #000000">&</span><span style="color: #000000"> C::GetInstance()<br /></span><span style="color: #008080"> 96</span><span style="color: #000000"><img id="Codehighlighter1_1340_1385_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1340_1385_Open_Text.style.display='none'; Codehighlighter1_1340_1385_Closed_Image.style.display='inline'; Codehighlighter1_1340_1385_Closed_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif"><img style="display: none" id="Codehighlighter1_1340_1385_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_1340_1385_Closed_Text.style.display='none'; Codehighlighter1_1340_1385_Open_Image.style.display='inline'; Codehighlighter1_1340_1385_Open_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif"></span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_1340_1385_Closed_Text"><img alt="" src="http://www.shnenglu.com/Images/dot.gif" /></span><span id="Codehighlighter1_1340_1385_Open_Text"><span style="color: #000000">{<br /></span><span style="color: #008080"> 97</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />    </span><span style="color: #0000ff">static</span><span style="color: #000000"> C s_instance;<br /></span><span style="color: #008080"> 98</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" /><br /></span><span style="color: #008080"> 99</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />    </span><span style="color: #0000ff">return</span><span style="color: #000000"> s_instance;<br /></span><span style="color: #008080">100</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" />}</span></span><span style="color: #000000"><br /></span><span style="color: #008080">101</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" /><br /></span><span style="color: #008080">102</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" /></span><span style="color: #0000ff">static</span><span style="color: #000000"> B gs_B2(</span><span style="color: #000000">2</span><span style="color: #000000">);<br /></span><span style="color: #008080">103</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" />B g_B3(</span><span style="color: #000000">3</span><span style="color: #000000">);<br /></span><span style="color: #008080">104</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" /><br /></span><span style="color: #008080">105</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" /></span><span style="color: #0000ff">int</span><span style="color: #000000"> main(</span><span style="color: #0000ff">int</span><span style="color: #000000"> argc, </span><span style="color: #0000ff">char</span><span style="color: #000000"> </span><span style="color: #000000">*</span><span style="color: #000000"> argv[])<br /></span><span style="color: #008080">106</span><span style="color: #000000"><img id="Codehighlighter1_1453_1574_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1453_1574_Open_Text.style.display='none'; Codehighlighter1_1453_1574_Closed_Image.style.display='inline'; Codehighlighter1_1453_1574_Closed_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif"><img style="display: none" id="Codehighlighter1_1453_1574_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_1453_1574_Closed_Text.style.display='none'; Codehighlighter1_1453_1574_Open_Image.style.display='inline'; Codehighlighter1_1453_1574_Open_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif"></span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_1453_1574_Closed_Text"><img alt="" src="http://www.shnenglu.com/Images/dot.gif" /></span><span id="Codehighlighter1_1453_1574_Open_Text"><span style="color: #000000">{<br /></span><span style="color: #008080">107</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />    std::cout </span><span style="color: #000000"><<</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">Enter main</span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000"><<</span><span style="color: #000000"> std::endl;<br /></span><span style="color: #008080">108</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />    A::GetInstance().Do();<br /></span><span style="color: #008080">109</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />    C::GetInstance().Do();<br /></span><span style="color: #008080">110</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" /><br /></span><span style="color: #008080">111</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />    system(</span><span style="color: #000000">"</span><span style="color: #000000">pause</span><span style="color: #000000">"</span><span style="color: #000000">);<br /></span><span style="color: #008080">112</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />    </span><span style="color: #0000ff">return</span><span style="color: #000000"> </span><span style="color: #000000">0</span><span style="color: #000000">;<br /></span><span style="color: #008080">113</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" />}</span></span><span style="color: #000000"><br /></span><span style="color: #008080">114</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" /></span></div> <p> 鎺ヤ笅鏉ワ紝鑷劧灝辨槸鎵ц緇撴灉錛?/p> <p><img border="0" alt="" src="http://www.shnenglu.com/images/cppblog_com/qingbizhu/Ret_1.PNG" width="396" height="391" /></p> <p><img border="0" src="http://www.shnenglu.com/Emoticons/QQ/icon14.gif" width="20" height="21" alt="" />鍝熷惣~錛岃繖涓嶆鏄嚜宸辨兂瑕佺殑緇撴灉涔堬紝Perfect錛侊紒</p> <p>鏋勫緩綆鍗曪紝鍒涘緩鍏鋒湁瀹炴椂鎬э紙鍦ㄤ笖鍙湪絎竴嬈$敤鍒版椂鍒涘緩錛夛紝綰跨▼瀹夊叏錛屽彲浠ヨ鍏ㄥ眬鍙橀噺鐨勬瀯閫犲拰鏋愭瀯姝e父璋冪敤錛屽氨鏄畠浜嗭紝鏋佸姏鎺ㄨ崘錛丱(∩_∩)O~</p> <p> </p> <img src ="http://www.shnenglu.com/qingbizhu/aggbug/167682.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/qingbizhu/" target="_blank">闈掔ⅶ绔?/a> 2012-03-12 02:08 <a href="http://www.shnenglu.com/qingbizhu/archive/2012/03/12/167682.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Singleton妯″紡鈥斺擟++搴旂敤錛堜竴錛?/title><link>http://www.shnenglu.com/qingbizhu/archive/2012/03/12/167681.html</link><dc:creator>闈掔ⅶ绔?/dc:creator><author>闈掔ⅶ绔?/author><pubDate>Sun, 11 Mar 2012 18:04:00 GMT</pubDate><guid>http://www.shnenglu.com/qingbizhu/archive/2012/03/12/167681.html</guid><wfw:comment>http://www.shnenglu.com/qingbizhu/comments/167681.html</wfw:comment><comments>http://www.shnenglu.com/qingbizhu/archive/2012/03/12/167681.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/qingbizhu/comments/commentRss/167681.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/qingbizhu/services/trackbacks/167681.html</trackback:ping><description><![CDATA[<div>     鍓嶅ぉ錛屽湪鐪嬩簡銆婂墤鎸嘜ffer銆嬩腑鍏充簬Singleton妯″紡鐨勪竴孌靛唴瀹瑰悗錛屽氨鎸夎愪笉浣忓鍏跺湪C++涓婂畬緹庡疄鐜扮殑鎬濊冦備功涓繖涓璁叉槸閽堝C#鐨勫疄鐜版潵璁茶В鐨勶紝鍥犱負C#鐨勫瀮鍦懼洖鏀舵満鍒訛紝鍏朵腑閭d簺涓樉鐪肩殑[new]宸叉棤闇紼嬪簭鍛樺幓鎵嬪姩閲婃斁銆備絾鏄紝C++涓婄‘騫朵笉瀛樺湪鍨冨溇鍥炴敹鏈哄埗錛岀▼搴忓憳寰楁墜鍔╗delete] [new]鍑烘潵鐨勫唴瀹癸紝榪欏氨鏈変簡浠ヤ笅涓ら棶錛?/div> <ol><li>浣曟椂閲婃斁閫氳繃new鎵鍒涘緩鐨凷ingleton瀵硅薄錛?/li><li>濡傛灉涓嶉氳繃new銆乵alloc絳夋搷浣滐紝鏄惁鑳藉仛鍒板湪絎竴嬈′嬌鐢ㄦ椂鎵嶅垱寤篠ingleton瀵硅薄銆?/li></ol> <p>     鍦ㄩ拡瀵逛互涓婁袱涓棶棰樺仛浜嗕竴鐣濊冨拰灝濊瘯涔嬪悗錛岀粓浜庢湁浜嗘垚鏋溿傜幇鍛堢幇鍑烘潵錛屼緵澶у鍙傝冿紝涔熷笇鏈涙湁鏇村ソ濡欐嫑鐨勬湅鍙嬭兘涓嶅悵璧愭暀銆傜浜庤繛浠g爜甯︽枃瀛楋紝綃囧箙杈冮暱錛屾墍浠ユ垜灝嗗垎涓哄洓綃囨潵璁層傞偅涔堬紝寮濮嬪挴錛乛_^</p> <p> </p> <p>     涓寮濮嬶紝鎴戝厛鎷夸嬌鐢ㄩ潤鎬佹垚鍛樺彉閲忕殑鏉ュ疄鐜扮殑鎯版у崟浠舵潵榪涜灝濊瘯錛屽啓浜嗕釜Demo錛屼竴榪愯錛孫(∩_∩)O鍝堝搱~錛岃繕鐪熸湁鎰忓鐨勬敹鑾峰憿錛佸棷~錛屾姄绱ф椂闂達紝鍏堟妸鎴戠殑Demo涓婃潵緇欏ぇ瀹剁灖鐬э紒~</p> <div style="border-bottom: #cccccc 1px solid; border-left: #cccccc 1px solid; padding-bottom: 4px; background-color: #eeeeee; padding-left: 4px; width: 98%; padding-right: 5px; font-size: 13px; word-break: break-all; border-top: #cccccc 1px solid; border-right: #cccccc 1px solid; padding-top: 4px"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #008080">  1</span><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" /><span style="color: #008000">//</span><span style="color: #008000"> Singleton demo_0: Singleton instance is a static member of class.</span><span style="color: #008000"><br /></span><span style="color: #008080">  2</span><span style="color: #008000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" /></span><span style="color: #000000"><br /></span><span style="color: #008080">  3</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" />#include </span><span style="color: #000000"><</span><span style="color: #000000">Windows.h</span><span style="color: #000000">></span><span style="color: #000000"><br /></span><span style="color: #008080">  4</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" />#include </span><span style="color: #000000"><</span><span style="color: #000000">iostream</span><span style="color: #000000">></span><span style="color: #000000"><br /></span><span style="color: #008080">  5</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" /><br /></span><span style="color: #008080">  6</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" /></span><span style="color: #0000ff">class</span><span style="color: #000000"> A <br /></span><span style="color: #008080">  7</span><span style="color: #000000"><img id="Codehighlighter1_121_654_Open_Image" onclick="this.style.display='none'; Codehighlighter1_121_654_Open_Text.style.display='none'; Codehighlighter1_121_654_Closed_Image.style.display='inline'; Codehighlighter1_121_654_Closed_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif"><img style="display: none" id="Codehighlighter1_121_654_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_121_654_Closed_Text.style.display='none'; Codehighlighter1_121_654_Open_Image.style.display='inline'; Codehighlighter1_121_654_Open_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif"></span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_121_654_Closed_Text"><img alt="" src="http://www.shnenglu.com/Images/dot.gif" /></span><span id="Codehighlighter1_121_654_Open_Text"><span style="color: #000000">{<br /></span><span style="color: #008080">  8</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" /></span><span style="color: #0000ff">private</span><span style="color: #000000">:<br /></span><span style="color: #008080">  9</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />    </span><span style="color: #0000ff">static</span><span style="color: #000000"> A ms_instance;<br /></span><span style="color: #008080"> 10</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" /><br /></span><span style="color: #008080"> 11</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" /></span><span style="color: #0000ff">public</span><span style="color: #000000">:<br /></span><span style="color: #008080"> 12</span><span style="color: #000000"><img id="Codehighlighter1_189_214_Open_Image" onclick="this.style.display='none'; Codehighlighter1_189_214_Open_Text.style.display='none'; Codehighlighter1_189_214_Closed_Image.style.display='inline'; Codehighlighter1_189_214_Closed_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none" id="Codehighlighter1_189_214_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_189_214_Closed_Text.style.display='none'; Codehighlighter1_189_214_Open_Image.style.display='inline'; Codehighlighter1_189_214_Open_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif">    </span><span style="color: #0000ff">static</span><span style="color: #000000"> A</span><span style="color: #000000">&</span><span style="color: #000000"> GetInstance() </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_189_214_Closed_Text"><img alt="" src="http://www.shnenglu.com/Images/dot.gif" /></span><span id="Codehighlighter1_189_214_Open_Text"><span style="color: #000000">{<br /></span><span style="color: #008080"> 13</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />        </span><span style="color: #0000ff">return</span><span style="color: #000000"> ms_instance;<br /></span><span style="color: #008080"> 14</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" />    }</span></span><span style="color: #000000"><br /></span><span style="color: #008080"> 15</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" /><br /></span><span style="color: #008080"> 16</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" /></span><span style="color: #0000ff">private</span><span style="color: #000000">:<br /></span><span style="color: #008080"> 17</span><span style="color: #000000"><img id="Codehighlighter1_260_338_Open_Image" onclick="this.style.display='none'; Codehighlighter1_260_338_Open_Text.style.display='none'; Codehighlighter1_260_338_Closed_Image.style.display='inline'; Codehighlighter1_260_338_Closed_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none" id="Codehighlighter1_260_338_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_260_338_Closed_Text.style.display='none'; Codehighlighter1_260_338_Open_Image.style.display='inline'; Codehighlighter1_260_338_Open_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif">    A() : m_nStat1(</span><span style="color: #000000">-</span><span style="color: #000000">1</span><span style="color: #000000">), m_nStat2(</span><span style="color: #000000">-</span><span style="color: #000000">1</span><span style="color: #000000">) </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_260_338_Closed_Text"><img alt="" src="http://www.shnenglu.com/Images/dot.gif" /></span><span id="Codehighlighter1_260_338_Open_Text"><span style="color: #000000">{<br /></span><span style="color: #008080"> 18</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />        m_nStat1 </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">0</span><span style="color: #000000">;<br /></span><span style="color: #008080"> 19</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />        std::cout </span><span style="color: #000000"><<</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">Construct A</span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000"><<</span><span style="color: #000000"> std::endl;<br /></span><span style="color: #008080"> 20</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />        m_nStat2 </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">0</span><span style="color: #000000">;<br /></span><span style="color: #008080"> 21</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" />    }</span></span><span style="color: #000000"><br /></span><span style="color: #008080"> 22</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />    A(</span><span style="color: #0000ff">const</span><span style="color: #000000"> A</span><span style="color: #000000">&</span><span style="color: #000000">);<br /></span><span style="color: #008080"> 23</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" /><br /></span><span style="color: #008080"> 24</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" /></span><span style="color: #0000ff">public</span><span style="color: #000000">:<br /></span><span style="color: #008080"> 25</span><span style="color: #000000"><img id="Codehighlighter1_369_446_Open_Image" onclick="this.style.display='none'; Codehighlighter1_369_446_Open_Text.style.display='none'; Codehighlighter1_369_446_Closed_Image.style.display='inline'; Codehighlighter1_369_446_Closed_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none" id="Codehighlighter1_369_446_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_369_446_Closed_Text.style.display='none'; Codehighlighter1_369_446_Open_Image.style.display='inline'; Codehighlighter1_369_446_Open_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif">    </span><span style="color: #000000">~</span><span style="color: #000000">A() </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_369_446_Closed_Text"><img alt="" src="http://www.shnenglu.com/Images/dot.gif" /></span><span id="Codehighlighter1_369_446_Open_Text"><span style="color: #000000">{<br /></span><span style="color: #008080"> 26</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />        m_nStat1 </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">0</span><span style="color: #000000">;<br /></span><span style="color: #008080"> 27</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />        std::cout </span><span style="color: #000000"><<</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">Destruct A</span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000"><<</span><span style="color: #000000"> std::endl;<br /></span><span style="color: #008080"> 28</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />        m_nStat2 </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">0</span><span style="color: #000000">;<br /></span><span style="color: #008080"> 29</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" />    }</span></span><span style="color: #000000"><br /></span><span style="color: #008080"> 30</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" /><br /></span><span style="color: #008080"> 31</span><span style="color: #000000"><img id="Codehighlighter1_460_612_Open_Image" onclick="this.style.display='none'; Codehighlighter1_460_612_Open_Text.style.display='none'; Codehighlighter1_460_612_Closed_Image.style.display='inline'; Codehighlighter1_460_612_Closed_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none" id="Codehighlighter1_460_612_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_460_612_Closed_Text.style.display='none'; Codehighlighter1_460_612_Open_Image.style.display='inline'; Codehighlighter1_460_612_Open_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif">    </span><span style="color: #0000ff">void</span><span style="color: #000000"> Do() </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_460_612_Closed_Text"><img alt="" src="http://www.shnenglu.com/Images/dot.gif" /></span><span id="Codehighlighter1_460_612_Open_Text"><span style="color: #000000">{<br /></span><span style="color: #008080"> 32</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />        </span><span style="color: #000000">++</span><span style="color: #000000">m_nStat1;<br /></span><span style="color: #008080"> 33</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />        </span><span style="color: #000000">++</span><span style="color: #000000">m_nStat2;<br /></span><span style="color: #008080"> 34</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />        std::cout </span><span style="color: #000000"><<</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">Called Do() by object of A. [</span><span style="color: #000000">"</span><span style="color: #000000"> <br /></span><span style="color: #008080"> 35</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />                  </span><span style="color: #000000"><<</span><span style="color: #000000"> m_nStat1 </span><span style="color: #000000"><<</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">, </span><span style="color: #000000">"</span><span style="color: #000000"> <br /></span><span style="color: #008080"> 36</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />                  </span><span style="color: #000000"><<</span><span style="color: #000000"> m_nStat2 </span><span style="color: #000000"><<</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">]</span><span style="color: #000000">"</span><span style="color: #000000"> <br /></span><span style="color: #008080"> 37</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />                  </span><span style="color: #000000"><<</span><span style="color: #000000"> std::endl;<br /></span><span style="color: #008080"> 38</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" />    }</span></span><span style="color: #000000"><br /></span><span style="color: #008080"> 39</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" /><br /></span><span style="color: #008080"> 40</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" /></span><span style="color: #0000ff">private</span><span style="color: #000000">:<br /></span><span style="color: #008080"> 41</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />    </span><span style="color: #0000ff">int</span><span style="color: #000000"> m_nStat1;<br /></span><span style="color: #008080"> 42</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />    </span><span style="color: #0000ff">int</span><span style="color: #000000"> m_nStat2;<br /></span><span style="color: #008080"> 43</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" />}</span></span><span style="color: #000000">;<br /></span><span style="color: #008080"> 44</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" /><br /></span><span style="color: #008080"> 45</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" /></span><span style="color: #0000ff">class</span><span style="color: #000000"> B<br /></span><span style="color: #008080"> 46</span><span style="color: #000000"><img id="Codehighlighter1_666_896_Open_Image" onclick="this.style.display='none'; Codehighlighter1_666_896_Open_Text.style.display='none'; Codehighlighter1_666_896_Closed_Image.style.display='inline'; Codehighlighter1_666_896_Closed_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif"><img style="display: none" id="Codehighlighter1_666_896_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_666_896_Closed_Text.style.display='none'; Codehighlighter1_666_896_Open_Image.style.display='inline'; Codehighlighter1_666_896_Open_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif"></span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_666_896_Closed_Text"><img alt="" src="http://www.shnenglu.com/Images/dot.gif" /></span><span id="Codehighlighter1_666_896_Open_Text"><span style="color: #000000">{<br /></span><span style="color: #008080"> 47</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" /></span><span style="color: #0000ff">public</span><span style="color: #000000">:<br /></span><span style="color: #008080"> 48</span><span style="color: #000000"><img id="Codehighlighter1_701_783_Open_Image" onclick="this.style.display='none'; Codehighlighter1_701_783_Open_Text.style.display='none'; Codehighlighter1_701_783_Closed_Image.style.display='inline'; Codehighlighter1_701_783_Closed_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none" id="Codehighlighter1_701_783_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_701_783_Closed_Text.style.display='none'; Codehighlighter1_701_783_Open_Image.style.display='inline'; Codehighlighter1_701_783_Open_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif">    B(</span><span style="color: #0000ff">int</span><span style="color: #000000"> nID) : m_nID(nID) </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_701_783_Closed_Text"><img alt="" src="http://www.shnenglu.com/Images/dot.gif" /></span><span id="Codehighlighter1_701_783_Open_Text"><span style="color: #000000">{<br /></span><span style="color: #008080"> 49</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />        std::cout </span><span style="color: #000000"><<</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">Construct B: </span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000"><<</span><span style="color: #000000"> m_nID </span><span style="color: #000000"><<</span><span style="color: #000000"> std::endl;<br /></span><span style="color: #008080"> 50</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />        A::GetInstance().Do();<br /></span><span style="color: #008080"> 51</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" />    }</span></span><span style="color: #000000"><br /></span><span style="color: #008080"> 52</span><span style="color: #000000"><img id="Codehighlighter1_791_872_Open_Image" onclick="this.style.display='none'; Codehighlighter1_791_872_Open_Text.style.display='none'; Codehighlighter1_791_872_Closed_Image.style.display='inline'; Codehighlighter1_791_872_Closed_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none" id="Codehighlighter1_791_872_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_791_872_Closed_Text.style.display='none'; Codehighlighter1_791_872_Open_Image.style.display='inline'; Codehighlighter1_791_872_Open_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif">    </span><span style="color: #000000">~</span><span style="color: #000000">B() </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_791_872_Closed_Text"><img alt="" src="http://www.shnenglu.com/Images/dot.gif" /></span><span id="Codehighlighter1_791_872_Open_Text"><span style="color: #000000">{<br /></span><span style="color: #008080"> 53</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />        std::cout </span><span style="color: #000000"><<</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">Destruct B: </span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000"><<</span><span style="color: #000000"> m_nID </span><span style="color: #000000"><<</span><span style="color: #000000"> std::endl;<br /></span><span style="color: #008080"> 54</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />        A::GetInstance().Do();<br /></span><span style="color: #008080"> 55</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" />    }</span></span><span style="color: #000000"><br /></span><span style="color: #008080"> 56</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" /><br /></span><span style="color: #008080"> 57</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" /></span><span style="color: #0000ff">private</span><span style="color: #000000">:<br /></span><span style="color: #008080"> 58</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />    </span><span style="color: #0000ff">int</span><span style="color: #000000"> m_nID;<br /></span><span style="color: #008080"> 59</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" />}</span></span><span style="color: #000000">;<br /></span><span style="color: #008080"> 60</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" /><br /></span><span style="color: #008080"> 61</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" /></span><span style="color: #0000ff">class</span><span style="color: #000000"> C<br /></span><span style="color: #008080"> 62</span><span style="color: #000000"><img id="Codehighlighter1_908_1327_Open_Image" onclick="this.style.display='none'; Codehighlighter1_908_1327_Open_Text.style.display='none'; Codehighlighter1_908_1327_Closed_Image.style.display='inline'; Codehighlighter1_908_1327_Closed_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif"><img style="display: none" id="Codehighlighter1_908_1327_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_908_1327_Closed_Text.style.display='none'; Codehighlighter1_908_1327_Open_Image.style.display='inline'; Codehighlighter1_908_1327_Open_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif"></span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_908_1327_Closed_Text"><img alt="" src="http://www.shnenglu.com/Images/dot.gif" /></span><span id="Codehighlighter1_908_1327_Open_Text"><span style="color: #000000">{<br /></span><span style="color: #008080"> 63</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" /></span><span style="color: #0000ff">private</span><span style="color: #000000">:<br /></span><span style="color: #008080"> 64</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />    </span><span style="color: #0000ff">static</span><span style="color: #000000"> C ms_instance;<br /></span><span style="color: #008080"> 65</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" /><br /></span><span style="color: #008080"> 66</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" /></span><span style="color: #0000ff">public</span><span style="color: #000000">:<br /></span><span style="color: #008080"> 67</span><span style="color: #000000"><img id="Codehighlighter1_976_1001_Open_Image" onclick="this.style.display='none'; Codehighlighter1_976_1001_Open_Text.style.display='none'; Codehighlighter1_976_1001_Closed_Image.style.display='inline'; Codehighlighter1_976_1001_Closed_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none" id="Codehighlighter1_976_1001_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_976_1001_Closed_Text.style.display='none'; Codehighlighter1_976_1001_Open_Image.style.display='inline'; Codehighlighter1_976_1001_Open_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif">    </span><span style="color: #0000ff">static</span><span style="color: #000000"> C</span><span style="color: #000000">&</span><span style="color: #000000"> GetInstance() </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_976_1001_Closed_Text"><img alt="" src="http://www.shnenglu.com/Images/dot.gif" /></span><span id="Codehighlighter1_976_1001_Open_Text"><span style="color: #000000">{<br /></span><span style="color: #008080"> 68</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />        </span><span style="color: #0000ff">return</span><span style="color: #000000"> ms_instance;<br /></span><span style="color: #008080"> 69</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" />    }</span></span><span style="color: #000000"><br /></span><span style="color: #008080"> 70</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" /><br /></span><span style="color: #008080"> 71</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" /></span><span style="color: #0000ff">private</span><span style="color: #000000">:<br /></span><span style="color: #008080"> 72</span><span style="color: #000000"><img id="Codehighlighter1_1032_1093_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1032_1093_Open_Text.style.display='none'; Codehighlighter1_1032_1093_Closed_Image.style.display='inline'; Codehighlighter1_1032_1093_Closed_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none" id="Codehighlighter1_1032_1093_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_1032_1093_Closed_Text.style.display='none'; Codehighlighter1_1032_1093_Open_Image.style.display='inline'; Codehighlighter1_1032_1093_Open_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif">    C() : m_nStat(</span><span style="color: #000000">-</span><span style="color: #000000">1</span><span style="color: #000000">) </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_1032_1093_Closed_Text"><img alt="" src="http://www.shnenglu.com/Images/dot.gif" /></span><span id="Codehighlighter1_1032_1093_Open_Text"><span style="color: #000000">{<br /></span><span style="color: #008080"> 73</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />        std::cout </span><span style="color: #000000"><<</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">Construct C</span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000"><<</span><span style="color: #000000"> std::endl;<br /></span><span style="color: #008080"> 74</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />        m_nStat </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">0</span><span style="color: #000000">;<br /></span><span style="color: #008080"> 75</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" />    }</span></span><span style="color: #000000"><br /></span><span style="color: #008080"> 76</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />    C(</span><span style="color: #0000ff">const</span><span style="color: #000000"> C</span><span style="color: #000000">&</span><span style="color: #000000">);<br /></span><span style="color: #008080"> 77</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" /><br /></span><span style="color: #008080"> 78</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" /></span><span style="color: #0000ff">public</span><span style="color: #000000">:<br /></span><span style="color: #008080"> 79</span><span style="color: #000000"><img id="Codehighlighter1_1124_1184_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1124_1184_Open_Text.style.display='none'; Codehighlighter1_1124_1184_Closed_Image.style.display='inline'; Codehighlighter1_1124_1184_Closed_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none" id="Codehighlighter1_1124_1184_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_1124_1184_Closed_Text.style.display='none'; Codehighlighter1_1124_1184_Open_Image.style.display='inline'; Codehighlighter1_1124_1184_Open_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif">    </span><span style="color: #000000">~</span><span style="color: #000000">C() </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_1124_1184_Closed_Text"><img alt="" src="http://www.shnenglu.com/Images/dot.gif" /></span><span id="Codehighlighter1_1124_1184_Open_Text"><span style="color: #000000">{<br /></span><span style="color: #008080"> 80</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />        std::cout </span><span style="color: #000000"><<</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">Destruct C</span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000"><<</span><span style="color: #000000"> std::endl;<br /></span><span style="color: #008080"> 81</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />        m_nStat </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">0</span><span style="color: #000000">;<br /></span><span style="color: #008080"> 82</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" />    }</span></span><span style="color: #000000"><br /></span><span style="color: #008080"> 83</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" /><br /></span><span style="color: #008080"> 84</span><span style="color: #000000"><img id="Codehighlighter1_1198_1301_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1198_1301_Open_Text.style.display='none'; Codehighlighter1_1198_1301_Closed_Image.style.display='inline'; Codehighlighter1_1198_1301_Closed_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none" id="Codehighlighter1_1198_1301_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_1198_1301_Closed_Text.style.display='none'; Codehighlighter1_1198_1301_Open_Image.style.display='inline'; Codehighlighter1_1198_1301_Open_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif">    </span><span style="color: #0000ff">void</span><span style="color: #000000"> Do() </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_1198_1301_Closed_Text"><img alt="" src="http://www.shnenglu.com/Images/dot.gif" /></span><span id="Codehighlighter1_1198_1301_Open_Text"><span style="color: #000000">{<br /></span><span style="color: #008080"> 85</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />        </span><span style="color: #000000">++</span><span style="color: #000000">m_nStat;<br /></span><span style="color: #008080"> 86</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />        std::cout </span><span style="color: #000000"><<</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">Called Do() by object of C. [</span><span style="color: #000000">"</span><span style="color: #000000"> <br /></span><span style="color: #008080"> 87</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />            </span><span style="color: #000000"><<</span><span style="color: #000000"> m_nStat </span><span style="color: #000000"><<</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">]</span><span style="color: #000000">"</span><span style="color: #000000"> <br /></span><span style="color: #008080"> 88</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />            </span><span style="color: #000000"><<</span><span style="color: #000000"> std::endl;<br /></span><span style="color: #008080"> 89</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" />    }</span></span><span style="color: #000000"><br /></span><span style="color: #008080"> 90</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" /><br /></span><span style="color: #008080"> 91</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" /></span><span style="color: #0000ff">private</span><span style="color: #000000">:<br /></span><span style="color: #008080"> 92</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />    </span><span style="color: #0000ff">int</span><span style="color: #000000"> m_nStat;<br /></span><span style="color: #008080"> 93</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" />}</span></span><span style="color: #000000">;<br /></span><span style="color: #008080"> 94</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" /><br /></span><span style="color: #008080"> 95</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" /></span><span style="color: #0000ff">static</span><span style="color: #000000"> B gs_B0(</span><span style="color: #000000">0</span><span style="color: #000000">);<br /></span><span style="color: #008080"> 96</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" />B g_B1(</span><span style="color: #000000">1</span><span style="color: #000000">);<br /></span><span style="color: #008080"> 97</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" />A A::ms_instance;<br /></span><span style="color: #008080"> 98</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" />C C::ms_instance;<br /></span><span style="color: #008080"> 99</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" /></span><span style="color: #0000ff">static</span><span style="color: #000000"> B gs_B2(</span><span style="color: #000000">2</span><span style="color: #000000">);<br /></span><span style="color: #008080">100</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" />B g_B3(</span><span style="color: #000000">3</span><span style="color: #000000">);<br /></span><span style="color: #008080">101</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" /><br /></span><span style="color: #008080">102</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" /></span><span style="color: #0000ff">int</span><span style="color: #000000"> main(</span><span style="color: #0000ff">int</span><span style="color: #000000"> argc, </span><span style="color: #0000ff">char</span><span style="color: #000000"> </span><span style="color: #000000">*</span><span style="color: #000000"> argv[])<br /></span><span style="color: #008080">103</span><span style="color: #000000"><img id="Codehighlighter1_1462_1583_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1462_1583_Open_Text.style.display='none'; Codehighlighter1_1462_1583_Closed_Image.style.display='inline'; Codehighlighter1_1462_1583_Closed_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif"><img style="display: none" id="Codehighlighter1_1462_1583_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_1462_1583_Closed_Text.style.display='none'; Codehighlighter1_1462_1583_Open_Image.style.display='inline'; Codehighlighter1_1462_1583_Open_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif"></span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_1462_1583_Closed_Text"><img alt="" src="http://www.shnenglu.com/Images/dot.gif" /></span><span id="Codehighlighter1_1462_1583_Open_Text"><span style="color: #000000">{<br /></span><span style="color: #008080">104</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />    std::cout </span><span style="color: #000000"><<</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">Enter main</span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000"><<</span><span style="color: #000000"> std::endl;<br /></span><span style="color: #008080">105</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />    A::GetInstance().Do();<br /></span><span style="color: #008080">106</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />    C::GetInstance().Do();<br /></span><span style="color: #008080">107</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" /><br /></span><span style="color: #008080">108</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />    system(</span><span style="color: #000000">"</span><span style="color: #000000">pause</span><span style="color: #000000">"</span><span style="color: #000000">);<br /></span><span style="color: #008080">109</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />    </span><span style="color: #0000ff">return</span><span style="color: #000000"> </span><span style="color: #000000">0</span><span style="color: #000000">;<br /></span><span style="color: #008080">110</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" />}</span></span></div> <p>涓轟簡鑳藉鍒嗘瀽寰楃粏鑷翠簺錛孌emo鍐欏緱闀夸簡鐐癸紝瑙佽皡鍜紒~</p> <p>    鍡紝瀵逛簡錛岃繕鏈夎繍琛岀粨鏋滐細</p> <p><img border="0" alt="" src="http://www.shnenglu.com/images/cppblog_com/qingbizhu/Ret_0.PNG" width="351" height="405" /></p> <p>浠旂粏鐪嬬湅緇撴灉錛屾湁娌¤寰楄繖緇撴灉寰堝嚭涔庢剰鏂欏晩錛燂紒錛侊紙欏轟究鎻愪笅錛屾垜鐢ㄧ殑緙栬瘧宸ュ叿鏄疺isual C++ 2010錛?/p> <p>浠庤繖涓繍琛岀粨鏋滐紝瀵歸氳繃闈欐佹垚鍛樺疄鐜扮殑鎯版у崟浠訛紝鎴戝緱鍒頒簡浠ヤ笅涓ょ偣錛?/p> <ol><li>瀵逛簬瀹氫箟鍦ㄥ崟浠跺璞′箣鍓嶇殑鍏ㄥ眬鎴栭潤鎬佸叏灞瀵硅薄錛岃櫧鐒跺崟浠跺璞¤繕鏄細鍦ㄨ皟鐢ㄥ墠鍙婃椂鏋勯狅紝浣嗘瀯閫犲嚱鏁板唴鐨勫垵濮嬪寲鎿嶄綔鍗村彲鑳藉湪闇瑕佷嬌鐢ㄦ椂榪樻湭鑳芥墽琛屽畬鍏ㄣ?br />濡傦細std::cout 灝變細浣垮緱鍗曚歡瀵硅薄鐨勬瀯閫犲嚱鏁拌皟鐢ㄨ鏆傚仠錛堝崟浠剁殑鍏朵粬鎿嶄綔榪樿兘緇х畫璋冪敤錛夛紝鐩村埌鍗曚歡涔嬪墠鐨勫叏灞鎴栭潤鎬佸叏灞鐨勬瀯閫犲嚱鏁板叏鎵ц瀹屼簡錛屾墠鑳界戶緇墽琛屻傘?span style="color: red">*榪欎釜鍘熷洜榪樿鏈夌煡閬撶殑楂樻墜鑳借祼鏁欍?/span>銆?/li><li>瀵逛簬瀹氫箟浜庡崟浠跺璞′箣鍚庣殑鍏ㄥ眬鎴栭潤鎬佸叏灞瀵硅薄錛屽鏋滃湪鏋愭瀯涓皟鐢ㄤ簡鍗曚歡錛屽氨浼氫嬌寰楀崟浠跺湪閲婃斁鍚庡張琚啀嬈¢噸鏂板垱寤轟嬌鐢ㄣ傚綋鐒訛紝榪欐椂鍗曚歡鍐呮墍瀛樼殑鏁版嵁宸茶窡涔嬪墠姣棤鍏寵仈浜嗐?/li></ol> <p>鍥犳錛屾垜瑕佸鍔濆悇浣嶅紑鍙戣咃紝濡傛灉鍦ㄤ綘鐨勫叏灞鎴栭潤鎬佸叏灞瀵硅薄鐨勬瀯閫犳垨鏋愭瀯鏂規(guī)硶涓皟鐢ㄦ煇涓崟浠訛紝閭d箞瀵硅鍗曚歡鐨勫疄鐜板氨涓嶈浠ラ潤鎬佹垚鍛樻潵鎯版у湴瀹炵幇銆?/p> <p> </p> <img src ="http://www.shnenglu.com/qingbizhu/aggbug/167681.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/qingbizhu/" target="_blank">闈掔ⅶ绔?/a> 2012-03-12 02:04 <a href="http://www.shnenglu.com/qingbizhu/archive/2012/03/12/167681.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.pydjango.cn" target="_blank">性做久久久久久久久</a>| <a href="http://www.mycqh.cn" target="_blank">伊人久久大香线蕉亚洲</a>| <a href="http://www.aving.com.cn" target="_blank">久久久久久久久66精品片</a>| <a href="http://www.eeof.cn" target="_blank">99久久精品国产一区二区蜜芽</a>| <a href="http://www.ixdsw.cn" target="_blank">人妻少妇久久中文字幕一区二区</a>| <a href="http://www.51kuyu.cn" target="_blank">国产香蕉久久精品综合网</a>| <a href="http://www.y6smog.cn" target="_blank">久久亚洲中文字幕精品一区</a>| <a href="http://www.gdchengye.com.cn" target="_blank">久久久久亚洲AV成人网人人软件</a>| <a href="http://www.eksn.cn" target="_blank">成人a毛片久久免费播放</a>| <a href="http://www.vtql.cn" target="_blank">国产精品久久久久乳精品爆</a>| <a href="http://www.secwatch.com.cn" target="_blank">国内精品欧美久久精品</a>| <a href="http://www.meloful.cn" target="_blank">久久93精品国产91久久综合</a>| <a href="http://www.4527.com.cn" target="_blank">国产精品99久久久久久董美香</a>| <a href="http://www.eiszar86.cn" target="_blank">国产精品女同一区二区久久</a>| <a href="http://www.vtqqv.cn" target="_blank">欧美色综合久久久久久</a>| <a href="http://www.vtsg.cn" target="_blank">久久婷婷五月综合成人D啪</a>| <a href="http://www.jzzhenan.cn" target="_blank">久久精品中文字幕一区</a>| <a href="http://www.baochong.com.cn" target="_blank">婷婷久久香蕉五月综合加勒比 </a>| <a href="http://www.todaytrends.cn" target="_blank">亚洲国产精品无码久久</a>| <a href="http://www.xileshun.cn" target="_blank">一本久久知道综合久久</a>| <a href="http://www.mir818.cn" target="_blank">久久久久久无码Av成人影院</a>| <a href="http://www.kyj123.cn" target="_blank">狠狠色丁香久久综合婷婷</a>| <a href="http://www.qqmuying.cn" target="_blank">国产成人精品久久综合</a>| <a href="http://www.248hh.cn" target="_blank">国产精品久久久久天天影视</a>| <a href="http://www.ppxp.com.cn" target="_blank">久久久久四虎国产精品</a>| <a href="http://www.atbook.cn" target="_blank">久久久久久国产精品无码下载</a>| <a href="http://www.tjywmc.cn" target="_blank">一级a性色生活片久久无少妇一级婬片免费放</a>| <a href="http://www.qhd33.cn" target="_blank">思思久久99热只有频精品66</a>| <a href="http://www.egpk.cn" target="_blank">久久综合噜噜激激的五月天</a>| <a href="http://www.ycsxw.cn" target="_blank">91久久香蕉国产熟女线看</a>| <a href="http://www.zhe38.cn" target="_blank">亚洲精品国产自在久久</a>| <a href="http://www.hhabg.com.cn" target="_blank">少妇熟女久久综合网色欲</a>| <a href="http://www.jumbo8.cn" target="_blank">1000部精品久久久久久久久</a>| <a href="http://www.cqmh.com.cn" target="_blank">香蕉aa三级久久毛片</a>| <a href="http://www.zhe9tao.cn" target="_blank">国产精品久久久久AV福利动漫 </a>| <a href="http://www.jituansms.cn" target="_blank">国产精品视频久久久</a>| <a href="http://www.iceplaza.cn" target="_blank">久久播电影网</a>| <a href="http://www.jvfl.cn" target="_blank">国产成人精品免费久久久久</a>| <a href="http://www.hasgw.cn" target="_blank">伊人久久大香线蕉综合热线</a>| <a href="http://www.xmqsgm.cn" target="_blank">久久电影网一区</a>| <a href="http://www.xiaoaiyl.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>