锘??xml version="1.0" encoding="utf-8" standalone="yes"?>久久久久亚洲AV成人网人人网站,99久久成人18免费网站,久久久久久亚洲精品不卡http://www.shnenglu.com/flyingxu/category/823.htmlto get ready...zh-cnThu, 30 Apr 2009 03:19:20 GMTThu, 30 Apr 2009 03:19:20 GMT60thinking in c++ 涔犻絳旀http://www.shnenglu.com/flyingxu/archive/2006/08/09/11022.htmlflyingxuflyingxuTue, 08 Aug 2006 16:19:00 GMThttp://www.shnenglu.com/flyingxu/archive/2006/08/09/11022.htmlhttp://www.shnenglu.com/flyingxu/comments/11022.htmlhttp://www.shnenglu.com/flyingxu/archive/2006/08/09/11022.html#Feedback1http://www.shnenglu.com/flyingxu/comments/commentRss/11022.htmlhttp://www.shnenglu.com/flyingxu/services/trackbacks/11022.html榪欎釜絳旀鏈潵鏄綔鑰呭崠閽辯殑錛屾垜蹇樹簡鏄粠閭d釜緗戠珯涓嬭澆鐨勪簡錛屼及璁′笉鍏ㄣ?br>鐜板湪鏈変漢瑕侊紝灝辨斁涓婃潵鍚?/p>

http://www.shnenglu.com/Files/flyingxu/ThinkinginCppExercise.rar

(鏈獙璇侊紝鍙兘涓嶅叏錛屾垨鑰呮牴鏈氨涓嶆槸絳旀)



flyingxu 2006-08-09 00:19 鍙戣〃璇勮
]]>
Is MSDN wrong? or I made a mistake? about static member functionhttp://www.shnenglu.com/flyingxu/archive/2006/07/11/9697.htmlflyingxuflyingxuTue, 11 Jul 2006 11:14:00 GMThttp://www.shnenglu.com/flyingxu/archive/2006/07/11/9697.htmlhttp://www.shnenglu.com/flyingxu/comments/9697.htmlhttp://www.shnenglu.com/flyingxu/archive/2006/07/11/9697.html#Feedback3http://www.shnenglu.com/flyingxu/comments/commentRss/9697.htmlhttp://www.shnenglu.com/flyingxu/services/trackbacks/9697.htmlhttp://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.vc.mfc&tid=402a414c-a125-45bd-9cf4-c1819db7e3e4錛?br />
in聽http://msdn2.microsoft.com/en-us/library/480b7kf7.aspx,聽it聽says聽that聽
pGdiObject->DeleteTempMap()
;聽聽//聽Causes聽compiler聽error

But聽I'm聽confused聽for聽a聽static聽member聽can聽be聽called聽by聽the聽object聽or聽a聽pointer.
Is聽there聽anything聽wrong聽of聽my聽understanding?

鍥炵瓟鐨勪漢鍒拌洰澶氾紝璁ㄨ鐨勪篃寰堢儹鐑堬紝浣嗛兘娌℃湁鐩存帴鍥炵瓟鎴戠殑闂錛屾垜鐨勯棶棰樻槸錛屽浜庨潤鎬佸嚱鏁幫紝
pGdiObject->DeleteTempMap();聽聽//聽Causes聽compiler聽error錛?br />鍒板簳瀵逛笉瀵癸紵濡傛灉涓嶅錛屽氨鏄痬sdn閿欎簡錛屼笉榪囨昏寰楁瘮杈冨鎬紝msdn涓嶈鍑鴻繖鏍風殑閿欑殑

flyingxu 2006-07-11 19:14 鍙戣〃璇勮
]]>
_asm int 3 鐨勪竴涓簲鐢細鍦ㄧ▼搴忚繍琛屽悗鍐嶈繘鍏ヨ皟璇曞櫒http://www.shnenglu.com/flyingxu/archive/2006/07/06/9493.htmlflyingxuflyingxuThu, 06 Jul 2006 09:35:00 GMThttp://www.shnenglu.com/flyingxu/archive/2006/07/06/9493.htmlhttp://www.shnenglu.com/flyingxu/comments/9493.htmlhttp://www.shnenglu.com/flyingxu/archive/2006/07/06/9493.html#Feedback9http://www.shnenglu.com/flyingxu/comments/commentRss/9493.htmlhttp://www.shnenglu.com/flyingxu/services/trackbacks/9493.html1錛夊惎鍔ㄨ皟璇曞櫒錛屾瘮濡俈C
2錛夊湪VC涓鏂偣
3錛夋搷浣滅▼搴忥紝浣垮緱紼嬪簭榪愯鍒版柇鐐癸紝鍋滀笅鏉?br />浣嗘槸鐜板湪鎴戦亣鍒頒竴涓儏鍐碉紝甯屾湜璋冭瘯鐨勬儏鏅槸榪欐牱鐨勶細鍙屽嚮鏌愪釜鏂囦歡錛屾垜鐨勭▼搴忓惎鍔ㄥ悗錛岃繖涓椂鍊欐垜鎯崇▼搴忓仠涓嬫潵錛岃鎴戝湪VC涓皟璇曞畠銆?br />浣嗘槸錛屽弻鍑繪枃浠跺悗鍚姩鐨勭▼搴忥紝鏄釜鐙珛鐨別xe榪愯紼嬪簭錛岃偗瀹氫笉鏄湪VC鐨勮繍琛屾帶鍒朵笅鐨勶紝VC涓緗殑鏂偣涓嶈搗浣滅敤鐨勩傛庝箞鍔炲憿錛?br />榪欎釜鏃跺欏彲浠ュ湪鎯寵紼嬪簭鍋滀笅鏉ョ殑鍦版柟澧炲姞鎸囦護_asm int 3錛宒ebug涓嬬紪璇戝ソ銆傚弻鍑繪枃浠跺悗榪愯榪欎釜exe錛屽湪exe榪愯鍒癬asm int 3鏃訛紝灝變細涓柇錛岃屾妸褰撳墠鐨別xe榪愯涓庝竴涓柊鐨勮皟璇曞櫒錛堜竴涓柊鐨刅C榪涚▼錛夌粨鍚堣搗鏉ャ傛帴涓嬫潵灝卞儚涓鑸殑璋冭瘯浜嗐?br />榪欐椂鐨勮皟璇曟楠ょ被浼間笌錛?br />1錛夌▼搴忚繍琛?br />2錛夐亣鍒扮壒瀹氭潯浠舵椂錛宊asm int 3鎶婂綋鍓峞xe涓庝竴涓柊鐨勮皟璇曞櫒錛屾瘮濡備竴涓柊鐨刅C榪涚▼錛岃仈緋昏搗鏉?br />3錛夊湪璋冭瘯鍣ㄤ腑璋冭瘯exe

錛氾級

flyingxu 2006-07-06 17:35 鍙戣〃璇勮
]]>
Make header files self-sufficient鐨勪竴涓緥瀛?/title><link>http://www.shnenglu.com/flyingxu/archive/2006/06/23/8908.html</link><dc:creator>flyingxu</dc:creator><author>flyingxu</author><pubDate>Fri, 23 Jun 2006 12:56:00 GMT</pubDate><guid>http://www.shnenglu.com/flyingxu/archive/2006/06/23/8908.html</guid><wfw:comment>http://www.shnenglu.com/flyingxu/comments/8908.html</wfw:comment><comments>http://www.shnenglu.com/flyingxu/archive/2006/06/23/8908.html#Feedback</comments><slash:comments>5</slash:comments><wfw:commentRss>http://www.shnenglu.com/flyingxu/comments/commentRss/8908.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/flyingxu/services/trackbacks/8908.html</trackback:ping><description><![CDATA[C錛嬶紜緙栫▼瑙勮寖涓23鏉′腑璇達細<br />If one header file won't work unless the file that includes it also includes another header, that's gauche and puts unnecessary burden on that header file's users.<br />鍛靛懙錛岃嫳璇湁鐐規嫍鍙o紝鍚庨潰涓劇殑渚嬪瓙涔熼兘鏄ā鏉跨殑渚嬪瓙銆傛垜鍊掓槸閬囧埌榪囦竴涓疄闄呯殑渚嬪瓙錛岀畝鍖栧悗濡備笅錛?br /><div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><font face="Courier New"><span style="COLOR: #008000">//</span><span style="COLOR: #008000">a.h</span></font><span style="COLOR: #008000"><br /></span><span style="COLOR: #0000ff"><font face="Courier New">class</font></span><font face="Courier New"><span style="COLOR: #000000">聽A聽<br />{<br />聽</span><span style="COLOR: #0000ff">int</span></font><span style="COLOR: #000000"><font face="Courier New">聽a;<br />};</font></span></div>聽<br /><div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><span style="COLOR: #008000">//</span><span style="COLOR: #008000">b.h<br /></span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">娉ㄦ剰錛歜.h騫舵病鏈塱nclude聽a.h</span><span style="COLOR: #008000"><br /></span><span style="COLOR: #0000ff"><font face="Courier New">class</font></span><span style="COLOR: #000000"><font face="Courier New">聽B聽<br />{<br />聽A聽a;<br />};</font>聽</span></div>鐢ㄧ殑鏃跺欐庝箞鐢ㄥ憿錛熸瘮濡傚湪main.cpp涓兂鐢╟lass B<br /><div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><font face="Courier New"><span style="COLOR: #008000">//</span><span style="COLOR: #008000">main.cpp</span></font><span style="COLOR: #008000"><br /></span><font face="Courier New"><span style="COLOR: #000000">#include聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">a.h</span><span style="COLOR: #000000">"</span></font><span style="COLOR: #000000"><br /><font face="Courier New">#include聽</font></span><font face="Courier New"><span style="COLOR: #000000">"</span><span style="COLOR: #000000">b.h</span><span style="COLOR: #000000">"</span></font><span style="COLOR: #000000"><br /></span><font face="Courier New"><span style="COLOR: #008000">//</span><span style="COLOR: #008000"><img src="http://www.shnenglu.com/images/dot.gif" /></span></font><span style="COLOR: #008000"><br /></span><font face="Courier New"><span style="COLOR: #000000">B聽b;<br /></span><span style="COLOR: #008000">//</span></font><font face="Courier New"><span style="COLOR: #008000"><img src="http://www.shnenglu.com/images/dot.gif" /><br /></span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">do聽something聽on聽b</span></font></div>鍙互鐪嬪埌錛宮ain涓轟簡浣跨敤B錛岃繕寰楀寘鍚玜.h錛岃繖灝辨槸涓婇潰涓孌佃嫳璇鐨勶細<br />濡傛灉涓涓ご鏂囦歡錛坆.h錛変笉鑳藉伐浣滐紝闄ら潪鍖呭惈瀹冿紙b.h錛夌殑鏂囦歡錛堜篃灝辨槸main.cpp錛変篃鍖呭惈鍙︿竴涓ご鏂囦歡錛坅.h錛?..<br /><br />hehe錛屽綋鎴戠涓嬈¢亣鍒拌繖縐嶆儏鍐墊椂錛屾兂浜嗗崐澶╀篃鎯充笉鏄庣櫧涓轟粈涔堟垜鏄庢槑鍖呭惈浜哹.h榪樻槸涓嶈兘鐢˙鍟?br /><br />閭d箞錛屾紜殑鍐欐硶搴旇鏄粈涔堝憿錛?br />鍦ㄧ被B鐨勪綔鑰呭湪璁捐B鐨勬椂鍊欙紝灝卞簲璇ユ兂鍒扮敤鎴峰彧闇瑕?include "b.h"灝卞彲浠ヤ嬌鐢ㄨ繖涓猚lass B銆傛墍浠ワ紝鍦╞.h鏂囦歡涓紝搴旇鍐欐槑#include "a.h"錛岃屼笉鏄鐢ㄦ埛鍦╩ain.cpp涓幓include "a.h"<br /><br />:)<img src ="http://www.shnenglu.com/flyingxu/aggbug/8908.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/flyingxu/" target="_blank">flyingxu</a> 2006-06-23 20:56 <a href="http://www.shnenglu.com/flyingxu/archive/2006/06/23/8908.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>[zz]鏈鍏ㄧ殑printf鍙傛暟鎰忎箟琛?/title><link>http://www.shnenglu.com/flyingxu/archive/2006/06/16/8635.html</link><dc:creator>flyingxu</dc:creator><author>flyingxu</author><pubDate>Fri, 16 Jun 2006 06:05:00 GMT</pubDate><guid>http://www.shnenglu.com/flyingxu/archive/2006/06/16/8635.html</guid><wfw:comment>http://www.shnenglu.com/flyingxu/comments/8635.html</wfw:comment><comments>http://www.shnenglu.com/flyingxu/archive/2006/06/16/8635.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/flyingxu/comments/commentRss/8635.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/flyingxu/services/trackbacks/8635.html</trackback:ping><description><![CDATA[鍦?a class="singleposttitle" id="viewpost1_TitleUrl" >鍏充簬printf鐨勫ぇ閮ㄥ垎鍙傛暟紲ヨВ</a> (<a >http://blog.vckbase.com/flyingleaf/archive/2004/12/27/2335.aspx</a>)鏂囩珷鍚庨潰鐨?strong><font style="BACKGROUND-COLOR: #ccffff">璇勮</font></strong>涓?鐪嬪埌浜嗗埌鐩墠涓烘鎴戠湅鍒拌繃鐨勬渶鍏ㄧ殑printf鍙傛暟鎰忎箟琛?<br />浠ュ墠涓鐩村湪msdn閲屾煡,閮芥病鏈夎繖涔堣緇嗙殑.<br />鍏跺疄瀹冩槸gnu c鐨勪竴涓枃妗?<font color="#000000">Formatted </font><span id="highlight_tag" style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: bold; PADDING-BOTTOM: 0px; COLOR: #ee6600; PADDING-TOP: 0px; BACKGROUND-COLOR: #ffff00; EE6600: "><font style="BACKGROUND-COLOR: #ffffff"><font color="#000000">Output</font> (</font><a ><font style="BACKGROUND-COLOR: #ffffff">http://www.gnu.org/software/libc/manual/html_node/Formatted-Output.html#Formatted-Output</font></a><font style="BACKGROUND-COLOR: #ffffff">)</font></span><img src ="http://www.shnenglu.com/flyingxu/aggbug/8635.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/flyingxu/" target="_blank">flyingxu</a> 2006-06-16 14:05 <a href="http://www.shnenglu.com/flyingxu/archive/2006/06/16/8635.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>灝藉彲鑳界殑浣跨敤鍏ㄥ眬鍙橀噺errno鏉ュ垽鏂姸鎬?/title><link>http://www.shnenglu.com/flyingxu/archive/2006/04/13/5480.html</link><dc:creator>flyingxu</dc:creator><author>flyingxu</author><pubDate>Thu, 13 Apr 2006 11:15:00 GMT</pubDate><guid>http://www.shnenglu.com/flyingxu/archive/2006/04/13/5480.html</guid><wfw:comment>http://www.shnenglu.com/flyingxu/comments/5480.html</wfw:comment><comments>http://www.shnenglu.com/flyingxu/archive/2006/04/13/5480.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.shnenglu.com/flyingxu/comments/commentRss/5480.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/flyingxu/services/trackbacks/5480.html</trackback:ping><description><![CDATA[濡傛灉鐪嬪埌榪欎釜鏍囬鏃?榪樹笉鐭ラ亾浠涔堟槸errno,閭d箞,浣犲氨鍜屾垜涓鏍?鍛靛懙,鎴戠紪紼嬩篃鏈?,5騫翠簡,浠婂ぉ鎵嶇煡閬揺rrno.<br />errno涓嶆槸鎴戝畾涔夌殑涓涓彉閲?涔熶笉鏄惁涓殢鎰忕殑鍙橀噺鍚?鑰屾槸crt搴撲腑瀹氫箟鐨勪竴涓叏灞鍙橀噺<br />瀹氫箟:errno Constants (<a >http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt_errno_Constants.asp</a>)<br /><div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><font face="Courier New"><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /><span style="COLOR: #0000ff">#if</span><span style="COLOR: #000000">聽聽聽聽聽(defined(_MT)聽||聽defined(_DLL))聽&&聽!defined(_MAC)</span></font><span style="COLOR: #000000"><br /><font face="Courier New"><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" />_CRTIMP聽</font></span><font face="Courier New"><span style="COLOR: #0000ff">extern</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">聽__cdecl聽_errno(</span><span style="COLOR: #0000ff">void</span></font><font face="Courier New"><span style="COLOR: #000000">);<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #0000ff">#define</span><span style="COLOR: #000000">聽errno聽聽聽(*_errno())</span></font><span style="COLOR: #000000"><br /><font face="Courier New"><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /></font></span><font face="Courier New"><span style="COLOR: #0000ff">#else</span><span style="COLOR: #000000">聽聽聽/*聽ndef聽_MT聽&&聽ndef聽_DLL聽*/</span></font><span style="COLOR: #000000"><br /><font face="Courier New"><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" />_CRTIMP聽</font></span><font face="Courier New"><span style="COLOR: #0000ff">extern</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">int</span></font><font face="Courier New"><span style="COLOR: #000000">聽errno;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #0000ff">#endif</span><span style="COLOR: #000000">聽聽/*聽_MT聽||聽_DLL聽*/</span></font><span style="COLOR: #000000"><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /></span></div>瀹為檯涓?灝辨槸鍐嶄竴浜沜rt鍑芥暟璋冪敤鍚?errno浼氳璧嬪?琛ㄧず鍑芥暟璋冪敤鐨勭姸鎬?鏈夌偣綾諱技window api涓殑GetLastError<br />榪欎簺crt鍑芥暟鍖呮嫭fgetpos鎴栬協tell鍜宻trtol涔嬬被.<br />鍦ㄤ粈涔堟椂鍊欑敤瀹冨憿?鐪嬩笅闈㈢殑涓涓緥瀛?<br /><div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><font face="Courier New"><span style="COLOR: #000000">聽聽聽聽const </span><span style="COLOR: #0000ff">char</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">聽chTest聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">123456789222299999999</span><span style="COLOR: #000000">"</span></font><font face="Courier New"><span style="COLOR: #000000">;<br />聽聽聽聽</span><span style="COLOR: #0000ff">char</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">聽pStop聽</span><span style="COLOR: #000000">=</span></font><font face="Courier New"><span style="COLOR: #000000">聽NULL;<br />聽聽聽聽</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000">聽nValue聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽strtol(chTest,聽</span><span style="COLOR: #000000">&</span><span style="COLOR: #000000">pStop,聽</span><span style="COLOR: #000000">10</span></font><font face="Courier New"><span style="COLOR: #000000">);<br /><br />聽聽聽聽</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000">聽nError聽</span><span style="COLOR: #000000">=</span></font><font face="Courier New"><span style="COLOR: #000000">聽errno;<br />聽聽聽聽</span><span style="COLOR: #0000ff">if</span><span style="COLOR: #000000">(nError聽</span><span style="COLOR: #000000">==</span></font><span style="COLOR: #000000"><font face="Courier New">聽ERANGE)<br />聽聽聽聽聽聽聽聽perror(chTest);</font></span></div>榪欎釜鏃跺?nValue = 0x7fffffff,浣犲鏋滃彧鏄牴鎹畠鏉ュ垽鏂?鏄笉鐭ラ亾瀹為檯涓婂凡緇忓嚭閿欎簡.鎵浠?榪欎釜鏃跺欏繀欏誨熷姪errno鏉ュ垽鏂姸鎬?<br /><br />鎯劎鍟?浠婂ぉ鎵嶇煡閬?浠婂ぉ鐪媠trtol鐨刴sdn鏂囨。,鐪嬪埌涓鍙ヨ瘽For both functions, <b>errno</b> is set to <b>ERANGE</b> if overflow or underflow occurs.,鎴戠湅浜嗗崐澶╂病鏈夋壘鍒癳rrno,鍚庢潵涓鎼?鎵嶅彂鐜板畠灞呯劧鏄釜鍏ㄥ眬鍙橀噺.<img src ="http://www.shnenglu.com/flyingxu/aggbug/5480.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/flyingxu/" target="_blank">flyingxu</a> 2006-04-13 19:15 <a href="http://www.shnenglu.com/flyingxu/archive/2006/04/13/5480.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>涓涓猚pp緗戠珯http://www.shnenglu.com/flyingxu/archive/2006/03/07/3872.htmlflyingxuflyingxuTue, 07 Mar 2006 13:45:00 GMThttp://www.shnenglu.com/flyingxu/archive/2006/03/07/3872.htmlhttp://www.shnenglu.com/flyingxu/comments/3872.htmlhttp://www.shnenglu.com/flyingxu/archive/2006/03/07/3872.html#Feedback0http://www.shnenglu.com/flyingxu/comments/commentRss/3872.htmlhttp://www.shnenglu.com/flyingxu/services/trackbacks/3872.htmlhttp://www.cpper.com/
閭i噷璁哄潧閲岀殑閮芥槸澶х墰錛岃鐨勮瘽鎴戝惉涓嶆噦錛屾彃涓嶄笂鍢淬?img src ="http://www.shnenglu.com/flyingxu/aggbug/3872.html" width = "1" height = "1" />

flyingxu 2006-03-07 21:45 鍙戣〃璇勮
]]>
浠涔堟椂鍊欏繀欏繪樉寮忚皟鐢ㄦ瀽鏋勫嚱鏁幫紵http://www.shnenglu.com/flyingxu/archive/2006/03/04/3702.htmlflyingxuflyingxuFri, 03 Mar 2006 16:35:00 GMThttp://www.shnenglu.com/flyingxu/archive/2006/03/04/3702.htmlhttp://www.shnenglu.com/flyingxu/comments/3702.htmlhttp://www.shnenglu.com/flyingxu/archive/2006/03/04/3702.html#Feedback6http://www.shnenglu.com/flyingxu/comments/commentRss/3702.htmlhttp://www.shnenglu.com/flyingxu/services/trackbacks/3702.html宸ヤ綔涓彂鐜扮殑 銆嬩腑錛屾彁鍒版瀽鏋勫嚱鏁板彲浠ヨ嚜宸辮皟鐢紝騫剁敤涓涓緥瀛愮紪璇戙佽繍琛岃瘉鏄庝簡銆?BR>鐜板湪鏈変釜闂錛岄櫎浜嗙煡閬撯滄瀽鏋勫嚱鏁?STRONG>鍙互鑷繁璋冪敤鈥濆錛岄偅涔堜粈涔堟椂鍊?STRONG>蹇呴』鏄懼紡璋冪敤鏋愭瀯鍑芥暟錛?BR>
鍏堢湅涓孌電幇瀹炵敓媧諱腑鐨勪唬鐮佸惂錛宮fc婧愮爜涓細
BOOL CStatusBar::AllocElements(int nElements, int cbElement)
{
    
// destruct old elements
    AFX_STATUSPANE* pSBP = _GetPanePtr(0);
    
for (int i = 0; i < m_nCount; i++)
    {
        pSBP
->strText.~CString();   //娉ㄦ剰鐪嬭繖閲?/STRONG>
        
++pSBP;
    }

    
// allocate new elements
    if (!CControlBar::AllocElements(nElements, cbElement))
        
return FALSE;

    
// construct new elements
    pSBP = _GetPanePtr(0);
    
for (i = 0; i < m_nCount; i++)
    {
        memcpy(
&pSBP->strText, &afxEmptyString, sizeof(CString));
        
++pSBP;
    }
    
return TRUE;
}
鍦ㄤ笂闈㈢殑浠g爜涓紝灝辨湁鏄懼紡璋冪敤CString鐨勬瀽鏋勫嚱鏁扮殑浠g爜銆俢ool銆?BR>鍥犱負榪樿皟鐢ㄤ簡CControlBar::AllocElements()錛屼笂闈㈢殑浠g爜涓嶆槸寰堟槑鏄撅紝鎴戞妸CControlBar::AllocElements綆鍖栦竴涓嬪悗錛?BR>
BOOL CStatusBar::AllocElements(int nElements, int cbElement)
{
    
// destruct old elements
    AFX_STATUSPANE* pSBP = _GetPanePtr(0);
    
for (int i = 0; i < m_nCount; i++)
    {
        pSBP
->strText.~CString();   //娉ㄦ剰鐪嬭繖閲?/SPAN>
        ++pSBP;
    }

    
// allocate new elements
    
//if (!CControlBar::AllocElements(nElements, cbElement))
    
//    return FALSE;
    
//綆鍖栧悗鐨勪唬鐮侊紝瀹為檯榪愯鑲畾鏈夐棶棰橈紝浣嗘槸鍏抽敭涓滆タ鍑烘潵浜?/SPAN>
    free(pSBP);//娉ㄦ剰榪欓噷璋冪敤鐨勬槸free
    pSBP = calloc(nElements, cbElement);

    
// construct new elements
    pSBP = _GetPanePtr(0); //鏍規嵁mfc鐨勪唬鐮侊紝鍙互鐞嗚В榪欓噷鐨刾SBP鍜屽墠闈㈢殑pSBP榪樻槸鍚屼竴涓湴鍧
    for (i = 0; i < m_nCount; i++)
    {
        memcpy(
&pSBP->strText, &afxEmptyString, sizeof(CString));
        
++pSBP;
    }
    
return TRUE;
}
榪欎釜鏃跺欙紝濡傛灉娉ㄦ剰鍒版垜鐗瑰埆娉ㄩ噴鐨刦ree鍑芥暟璋冪敤錛屽彲鑳藉凡緇忔剰璇嗗埌浜嗕負浠涔堣鏄懼紡璋冪敤鏋愭瀯鍑芥暟浜嗐?BR>濡傛灉榪樻病鏈夛紝閭d箞鍙互闂嚜宸變竴涓潰璇曞父瑙勯棶棰橈細delete鍜宖ree鏈変粈涔堝尯鍒紵絳旓細delete浼氫嬌鏋愭瀯鍑芥暟琚皟鐢ㄣ?BR>鎴栬呭弽榪囨潵璇達紝free娌℃湁璋冪敤鏋愭瀯鍑芥暟錛岄偅涔堟庝箞鍔烇紵鎵浠ヤ綘蹇呴』鑷繁鏄劇ず璋冪敤鏋愭瀯鍑芥暟銆?IMG height=19 src="http://www.shnenglu.com/Emoticons/regular_smile.gif" width=19 border=0>

涓婇潰鐨勮繖涓緥瀛愬彲浠ヨ繖鏍鋒娊璞′笅錛岀幇鍦ㄩ渶瑕乫ree鎺変竴鍧楀唴瀛橈紝鑰岄偅鍧楀唴瀛樹腑錛岃繕鏈変竴涓被錛岀被閲岄潰榪樻湁鎸囬拡錛岋紙榪欓噷鏄疌String錛夐渶瑕佸湪鏋愭瀯鍑芥暟涓噴鏀懼唴瀛樸傚洜涓虹敤鐨勬槸free錛屾墍浠ラ偅涓被鐨勬瀽鏋勫嚱鏁頒笉浼氳嚜鍔ㄨ璋冪敤錛岃繖涓椂鍊欙紝灝?STRONG>蹇呴』鏄懼紡
璋冪敤閭d釜綾葷殑鏋愭瀯鍑芥暟銆?BR>
榪欎釜鏄笉鏄緢鍋忕殑闂鍛紵閬囧埌浜嗗氨鐪嬬湅錛屾病鏈夐亣鍒拌繃錛屼篃涓嶄細褰卞搷鏃ュ父宸ヤ綔錛屽搱銆?BR>
鍙﹀緇х畫闂釜闈㈣瘯闂錛宯ew鍜宑alloc鐨勫尯鍒紵鍝堬紝鏋勯犵殑鍑芥暟鐨勮皟鐢ㄥ晩
鎵浠ワ紝涓婇潰鐨勪唬鐮佺敤鐨刢alloc錛屽氨蹇呴』鏄劇ず璋冪敤鏋勯犲嚱鏁板晩錛屽湪鍝噷鍛紵灝辨槸
memcpy(&pSBP->strText, &afxEmptyString, sizeof(CString));
鍜孋String鐨勬瀯閫犲嚱鏁版瘮杈冧笅錛?BR>
_AFX_INLINE CString::CString()
    { m_pchData 
= afxEmptyString.m_pchData; }
浣嗘槸錛屼負浠涔堜笉灝辯洿鎺ヨ皟鐢ㄦ瀯閫犲嚱鏁板憿錛熸垜涔熶笉鐭ラ亾銆傝瑙?A id=Comments1_CommentList__ctl0_NameLink target=_blank>dhong涓嬮潰鐨勮瘎璁恒傦紙dhong綰犳浜嗘垜鐨勪竴涓敊璇級

涓嶈繃錛屼笅闈㈢殑浠g爜
        CString aStr;
        CString
* pStr = &aStr ;
        pStr
->CString();

鏄紪璇戜笉榪囩殑銆?/P>

 



flyingxu 2006-03-04 00:35 鍙戣〃璇勮
]]>
涓縐嶄復鏃跺彉閲忕殑鍛藉悕褰㈠紡http://www.shnenglu.com/flyingxu/archive/2006/03/03/3699.htmlflyingxuflyingxuFri, 03 Mar 2006 15:14:00 GMThttp://www.shnenglu.com/flyingxu/archive/2006/03/03/3699.htmlhttp://www.shnenglu.com/flyingxu/comments/3699.htmlhttp://www.shnenglu.com/flyingxu/archive/2006/03/03/3699.html#Feedback1http://www.shnenglu.com/flyingxu/comments/commentRss/3699.htmlhttp://www.shnenglu.com/flyingxu/services/trackbacks/3699.html
CBox aBox錛?/SPAN>
涔熷氨鏄錛屽湪鍛藉悕涓涓病鏈夊お澶氬疄闄呮剰涔夌殑鍙橀噺鏃訛紝鍙互鍦ㄥ墠闈㈠姞涓涓渁鈥濄?BR>鍛靛懙錛屾垜瑙夊緱榪欑鍛藉悕鏂規硶榪樻槸铔ソ鐨勶紝鍙兘鏄垜鐪嬩功鐪嬬殑灝戯紝鍦╟++鐨勪功涓繕娌℃湁鐪嬪埌榪囪繖鏍風殑鍐欐硶鎺ㄨ崘銆?BR>鑰屽湪msdn涓紝甯歌鐨勪緥瀛愪負錛?BR>
CFileFind finder;
鎴栬?BR>
CFile myFile;
鍛靛懙錛屼篃鏄敖閲忓啓涓涓悕璇嶅艦寮忋?BR>
鎵浠ュ憿錛屾柊鐨勫啓娉曞彲浠ュ啓鎴?BR>
CFile aFile


緇嗗皬鐨勯棶棰橈紝涓嶇敤閽葷墰瑙掑皷錛屽ソ鐜┿?IMG height=19 src="http://www.shnenglu.com/Emoticons/beer_mug.gif" width=19 border=0>

flyingxu 2006-03-03 23:14 鍙戣〃璇勮
]]>
鍏充簬CString鐨勪袱涓棶棰?/title><link>http://www.shnenglu.com/flyingxu/archive/2006/03/02/3631.html</link><dc:creator>flyingxu</dc:creator><author>flyingxu</author><pubDate>Thu, 02 Mar 2006 01:29:00 GMT</pubDate><guid>http://www.shnenglu.com/flyingxu/archive/2006/03/02/3631.html</guid><wfw:comment>http://www.shnenglu.com/flyingxu/comments/3631.html</wfw:comment><comments>http://www.shnenglu.com/flyingxu/archive/2006/03/02/3631.html#Feedback</comments><slash:comments>6</slash:comments><wfw:commentRss>http://www.shnenglu.com/flyingxu/comments/commentRss/3631.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/flyingxu/services/trackbacks/3631.html</trackback:ping><description><![CDATA[<P><STRONG>鍏充簬CString鐨勪袱涓棶棰?BR></STRONG><FONT size=2>璇?/FONT><A class=postTitle2 id=viewpost1_TitleUrl ><FONT size=2>CString,string,char*鐨勭患鍚堟瘮杈?涓)</FONT></A> <BR><BR>1 CString鐨勫熀綾?BR>鍦ㄣ婃瘮杈冦嬩竴鏂囦腑錛屽啓鍒幫細<BR>鈥淐String錛坱ypedef CStringT<TCHAR, StrTraitMFC<TCHAR>> CString錛変負Visual C++涓渶甯哥敤鐨勫瓧絎︿覆綾伙紝緇ф壙鑷狢SimpleStringT綾伙紝涓昏搴旂敤鍦∕FC鍜孉TL緙栫▼涓紝涓昏鏁版嵁綾誨瀷鏈塩har(搴旂敤浜嶢NSI)錛寃char_t(unicode)錛孴CHAR(ANSI涓巙nicode鍧囧彲)錛涒?BR>鎴戠涓鎰熻灝辨槸鏂囩珷鍐欓敊浜嗭紝鍥犱負鎴戠湅榪嘋String鐨勬簮鐮佺殑鍟婏細<BR></P> <DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #0000ff"><STRONG>struct</STRONG></SPAN><STRONG><SPAN style="COLOR: #000000"> CStringData<BR><IMG id=Codehighlighter1_19_292_Open_Image onclick="this.style.display='none'; Codehighlighter1_19_292_Open_Text.style.display='none'; Codehighlighter1_19_292_Closed_Image.style.display='inline'; Codehighlighter1_19_292_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_19_292_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_19_292_Closed_Text.style.display='none'; Codehighlighter1_19_292_Open_Image.style.display='inline'; Codehighlighter1_19_292_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" align=top></SPAN><SPAN id=Codehighlighter1_19_292_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.shnenglu.com/images/dot.gif"></SPAN></STRONG><SPAN id=Codehighlighter1_19_292_Open_Text><STRONG><SPAN style="COLOR: #000000">{<BR><IMG src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #0000ff">long</SPAN><SPAN style="COLOR: #000000"> nRefs;             </SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000"> reference count</SPAN></STRONG><SPAN style="COLOR: #008000"><BR><STRONG><IMG src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top></STRONG></SPAN><STRONG><SPAN style="COLOR: #000000">    </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> nDataLength;        </SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000"> length of data (including terminator)</SPAN></STRONG><SPAN style="COLOR: #008000"><BR><STRONG><IMG src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top></STRONG></SPAN><STRONG><SPAN style="COLOR: #000000">    </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> nAllocLength;       </SPAN><SPAN style="COLOR: #008000">//</SPAN></STRONG><STRONG><SPAN style="COLOR: #008000"> length of allocation<BR><IMG src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000"> TCHAR data[nAllocLength]</SPAN></STRONG><SPAN style="COLOR: #008000"><BR><STRONG><IMG src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top></STRONG></SPAN><SPAN style="COLOR: #000000"><BR><STRONG><IMG src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>    TCHAR</STRONG></SPAN><STRONG><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000"> data()           </SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000"> TCHAR* to managed data</SPAN></STRONG><SPAN style="COLOR: #008000"><BR><STRONG><IMG id=Codehighlighter1_263_290_Open_Image onclick="this.style.display='none'; Codehighlighter1_263_290_Open_Text.style.display='none'; Codehighlighter1_263_290_Closed_Image.style.display='inline'; Codehighlighter1_263_290_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_263_290_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_263_290_Closed_Text.style.display='none'; Codehighlighter1_263_290_Open_Image.style.display='inline'; Codehighlighter1_263_290_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top></STRONG></SPAN><STRONG><SPAN style="COLOR: #000000">        </SPAN><SPAN id=Codehighlighter1_263_290_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.shnenglu.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_263_290_Open_Text><SPAN style="COLOR: #000000">{ </SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000"> (TCHAR</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">)(</SPAN><SPAN style="COLOR: #0000ff">this</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000">); }</SPAN></SPAN></STRONG><SPAN style="COLOR: #000000"><BR><STRONG><IMG src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</STRONG></SPAN></SPAN><STRONG><SPAN style="COLOR: #000000">;<BR><IMG src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">class</SPAN></STRONG><STRONG><SPAN style="COLOR: #000000"> CString<BR><IMG id=Codehighlighter1_310_934_Open_Image onclick="this.style.display='none'; Codehighlighter1_310_934_Open_Text.style.display='none'; Codehighlighter1_310_934_Closed_Image.style.display='inline'; Codehighlighter1_310_934_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_310_934_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_310_934_Closed_Text.style.display='none'; Codehighlighter1_310_934_Open_Image.style.display='inline'; Codehighlighter1_310_934_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" align=top></SPAN><SPAN id=Codehighlighter1_310_934_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.shnenglu.com/images/dot.gif"></SPAN></STRONG><SPAN id=Codehighlighter1_310_934_Open_Text><STRONG><SPAN style="COLOR: #000000">{<BR><IMG src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">public</SPAN></STRONG><STRONG><SPAN style="COLOR: #000000">:<BR><IMG src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top></SPAN><SPAN style="COLOR: #008000">//</SPAN></STRONG><STRONG><SPAN style="COLOR: #008000"> Constructors<BR><IMG src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000"> constructs empty CString</SPAN></STRONG><SPAN style="COLOR: #008000"><BR><STRONG><IMG src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top></STRONG></SPAN><STRONG><SPAN style="COLOR: #000000">    CString();<BR><IMG src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000"> copy constructor</SPAN></STRONG><SPAN style="COLOR: #008000"><BR><STRONG><IMG src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top></STRONG></SPAN><STRONG><SPAN style="COLOR: #000000">    CString(</SPAN><SPAN style="COLOR: #0000ff">const</SPAN><SPAN style="COLOR: #000000"> CString</SPAN><SPAN style="COLOR: #000000">&</SPAN></STRONG><STRONG><SPAN style="COLOR: #000000"> stringSrc);<BR><IMG src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000"> from a single character</SPAN></STRONG><SPAN style="COLOR: #008000"><BR><STRONG><IMG src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top></STRONG></SPAN><STRONG><SPAN style="COLOR: #000000">    CString(TCHAR ch, </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> nRepeat </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">1</SPAN></STRONG><STRONG><SPAN style="COLOR: #000000">);<BR><IMG src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000"> from an ANSI string (converts to TCHAR)</SPAN></STRONG><SPAN style="COLOR: #008000"><BR><STRONG><IMG src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top></STRONG></SPAN><STRONG><SPAN style="COLOR: #000000">    CString(LPCSTR lpsz);<BR><IMG src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000"> from a UNICODE string (converts to TCHAR)</SPAN></STRONG><SPAN style="COLOR: #008000"><BR><STRONG><IMG src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top></STRONG></SPAN><STRONG><SPAN style="COLOR: #000000">    CString(LPCWSTR lpsz);<BR><IMG src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000"> subset of characters from an ANSI string (converts to TCHAR)</SPAN></STRONG><SPAN style="COLOR: #008000"><BR><STRONG><IMG src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top></STRONG></SPAN><STRONG><SPAN style="COLOR: #000000">    CString(LPCSTR lpch, </SPAN><SPAN style="COLOR: #0000ff">int</SPAN></STRONG><STRONG><SPAN style="COLOR: #000000"> nLength);<BR><IMG src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000"> subset of characters from a UNICODE string (converts to TCHAR)</SPAN></STRONG><SPAN style="COLOR: #008000"><BR><STRONG><IMG src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top></STRONG></SPAN><STRONG><SPAN style="COLOR: #000000">    CString(LPCWSTR lpch, </SPAN><SPAN style="COLOR: #0000ff">int</SPAN></STRONG><STRONG><SPAN style="COLOR: #000000"> nLength);<BR><IMG src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000"> from unsigned characters</SPAN></STRONG><SPAN style="COLOR: #008000"><BR><STRONG><IMG src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top></STRONG></SPAN><STRONG><SPAN style="COLOR: #000000">    CString(</SPAN><SPAN style="COLOR: #0000ff">const</SPAN><SPAN style="COLOR: #000000"> unsigned </SPAN><SPAN style="COLOR: #0000ff">char</SPAN><SPAN style="COLOR: #000000">*</SPAN></STRONG><STRONG><SPAN style="COLOR: #000000"> psz);<BR><IMG src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top></SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000"> Attributes & Operations</SPAN></STRONG></DIV> <P></SPAN><STRONG>浣嗘槸鐪嬫枃绔犵殑鏍峰瓙錛屼篃涓嶅儚鏄矖鍒舵互閫犵殑錛屽績閲屽緢鏄枒鎯戙?BR>鍚庢潵鍐嶆墦寮VC7鐨勬簮鐮佺湅錛屾灉鐒訛細<BR></STRONG></P> <DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><STRONG><SPAN style="COLOR: #000000">typedef ATL::CStringT</SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #000000"> TCHAR, StrTraitMFC</SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #000000"> TCHAR </SPAN><SPAN style="COLOR: #000000">></SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">></SPAN></STRONG><SPAN style="COLOR: #000000"><STRONG> CString;<BR></STRONG></SPAN></DIV> <P><STRONG>鐪嬫潵寰蔣鍦ㄤ笉鐭ヤ笉瑙変腑鍋氫簡榪欎箞澶х殑鍙樺寲銆?BR><BR>2 <BR>鈥渟tring鏄柟渚跨殑錛屽彲浠ヤ粠鍑犱箮鎵鏈夌殑瀛楃涓叉瀯閫犺屾潵錛屽寘鎷珻String鍜宑har*錛?nbsp;<BR> CString嬈′箣錛屽彲浠ヤ粠鍩烘湰鐨勪竴浜涘瓧絎︿覆鍙橀噺鏋勯犺屾潵錛屽寘鎷琧har*絳夛紱 鈥?BR>鐨勭‘錛屽涓嬬殑浠g爜鏄彲浠ョ紪璇戠殑錛?BR></STRONG></P> <DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><STRONG><SPAN style="COLOR: #000000">CString strTest </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">test</SPAN><SPAN style="COLOR: #000000">"</SPAN></STRONG><STRONG><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #0000ff">string</SPAN><SPAN style="COLOR: #000000"> sTest(strTest);</SPAN></STRONG></DIV> <P><STRONG>浣嗘槸榪欐槸琛ㄦ槑string姣擟String鏂逛究鍚楋紵<BR>瀹為檯涓婏紝鍦╯tring sTest(strTest);涓湁涓涓嚱鏁拌璋冪敤錛屽氨鏄細<BR></STRONG></P> <DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><STRONG><SPAN style="COLOR: #000000">_AFX_INLINE CString::</SPAN><SPAN style="COLOR: #0000ff">operator</SPAN><SPAN style="COLOR: #000000"> LPCTSTR() </SPAN><SPAN style="COLOR: #0000ff">const</SPAN></STRONG><SPAN style="COLOR: #000000"><BR><STRONG>    { </STRONG></SPAN><STRONG><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000"> m_pchData; }</SPAN></STRONG></DIV> <P><STRONG>鐒跺悗鎵嶆槸string鏋勯犵敓鎴愶紝榪欒兘璇存槸string姣擟String鏂逛究鍚楋紵搴旇璇存槸CString姣攕tring鏂逛究鎵嶅ソ銆?BR>铏界劧鍙互鐢?BR></STRONG></P> <DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><SPAN style="COLOR: #000000"><STRONG>CString strTest(sTest.c_str() );</STRONG></SPAN></DIV> <P><STRONG>鏉ュ垵濮嬪寲CString錛屼絾鏄疌String娌℃湁鍙傛暟涓簊tring鐨勬瀯閫犲嚱鏁幫紝涔熸槸涓涓皬灝忕殑閬楁喚錛屾瘯绔焥tring鏄痗++鏍囧噯搴撶殑涓閮ㄥ垎浜嗐?/STRONG></P><img src ="http://www.shnenglu.com/flyingxu/aggbug/3631.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/flyingxu/" target="_blank">flyingxu</a> 2006-03-02 09:29 <a href="http://www.shnenglu.com/flyingxu/archive/2006/03/02/3631.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.icaew.com.cn" target="_blank">国产亚洲美女精品久久久久狼</a>| <a href="http://www.pz25555.cn" target="_blank">久久国产精品免费一区二区三区</a>| <a href="http://www.rh-hr.cn" target="_blank">色青青草原桃花久久综合</a>| <a href="http://www.fj023.cn" target="_blank">欧美性猛交xxxx免费看久久久</a>| <a href="http://www.zburs.cn" target="_blank">色播久久人人爽人人爽人人片AV</a>| <a href="http://www.zjjhart.cn" target="_blank">亚洲中文字幕无码久久2020</a>| <a href="http://www.sd2sc.com.cn" target="_blank">国产精品对白刺激久久久</a>| <a href="http://www.9ii8.cn" target="_blank">久久青青国产</a>| <a href="http://www.etfp.cn" target="_blank">国内精品九九久久久精品</a>| <a href="http://www.dianwowang.cn" target="_blank">久久久受www免费人成</a>| <a href="http://www.qunlanggu.cn" target="_blank">久久久久人妻精品一区二区三区</a>| <a href="http://www.coldcha.cn" target="_blank">国产精品成人久久久久三级午夜电影 </a>| <a href="http://www.rcipbrdgydr.cn" target="_blank">国产精品欧美亚洲韩国日本久久 </a>| <a href="http://www.lphbca.org.cn" target="_blank">久久精品国产日本波多野结衣</a>| <a href="http://www.jiudexn.cn" target="_blank">亚洲精品乱码久久久久久蜜桃图片 </a>| <a href="http://www.lidonsj.cn" target="_blank">亚洲AⅤ优女AV综合久久久</a>| <a href="http://www.chipsummit.cn" target="_blank">色妞色综合久久夜夜</a>| <a href="http://www.ssc716.cn" target="_blank">Xx性欧美肥妇精品久久久久久</a>| <a href="http://www.yc-shop.cn" target="_blank">亚洲国产精品无码久久一区二区</a>| <a href="http://www.duange.com.cn" target="_blank">亚洲成人精品久久</a>| <a href="http://www.gbdv.cn" target="_blank">精品国产一区二区三区久久久狼 </a>| <a href="http://www.shibaba.cn" target="_blank">日韩精品国产自在久久现线拍 </a>| <a href="http://www.jn879.cn" target="_blank">欧美粉嫩小泬久久久久久久 </a>| <a href="http://www.ktqcc.cn" target="_blank">人妻精品久久久久中文字幕69</a>| <a href="http://www.o-led.com.cn" target="_blank">久久久久久av无码免费看大片</a>| <a href="http://www.vxpg.cn" target="_blank">国产精品美女久久久m</a>| <a href="http://www.szdeyi.cn" target="_blank">久久久久久久久波多野高潮</a>| <a href="http://www.yiranblog.cn" target="_blank">国产女人aaa级久久久级</a>| <a href="http://www.yhkim.cn" target="_blank">久久国产精品99精品国产987</a>| <a href="http://www.setocaster.cn" target="_blank">久久久久久久久久久久久久</a>| <a href="http://www.rszgrh2.cn" target="_blank">日韩AV毛片精品久久久</a>| <a href="http://www.pic789.cn" target="_blank">久久国产成人亚洲精品影院</a>| <a href="http://www.slwte.cn" target="_blank">伊人久久精品线影院</a>| <a href="http://www.seomog.cn" target="_blank">亚洲综合久久综合激情久久</a>| <a href="http://www.66zhuangzxkcw.cn" target="_blank">国产精品免费看久久久</a>| <a href="http://www.bbsfccy168.cn" target="_blank">久久国产精品成人影院</a>| <a href="http://www.mllp.net.cn" target="_blank">久久久一本精品99久久精品66</a>| <a href="http://www.vgqk.cn" target="_blank">久久久久人妻一区精品性色av</a>| <a href="http://www.mens-uno.com.cn" target="_blank">久久综合久久自在自线精品自</a>| <a href="http://www.zysun.com.cn" target="_blank">人妻无码久久一区二区三区免费</a>| <a href="http://www.ccfnt.com.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>