锘??xml version="1.0" encoding="utf-8" standalone="yes"?>久久婷婷影院,午夜精品久久久久久久99樱桃,国产一区二区三区在线观看视频 http://m.shnenglu.com/ashura/zh-cnMon, 17 Nov 2025 02:09:57 GMTMon, 17 Nov 2025 02:09:57 GMT60銆怓AQ銆慠PM杞歡鍖呬嬌鐢ㄥ父瑙侀棶棰?[ZZ]http://m.shnenglu.com/ashura/archive/2007/08/20/30420.htmlashuraashuraMon, 20 Aug 2007 05:21:00 GMThttp://m.shnenglu.com/ashura/archive/2007/08/20/30420.htmlhttp://m.shnenglu.com/ashura/comments/30420.htmlhttp://m.shnenglu.com/ashura/archive/2007/08/20/30420.html#Feedback0http://m.shnenglu.com/ashura/comments/commentRss/30420.htmlhttp://m.shnenglu.com/ashura/services/trackbacks/30420.html闃呰鍏ㄦ枃

ashura 2007-08-20 13:21 鍙戣〃璇勮
]]>
鑺卞績鑺辮http://m.shnenglu.com/ashura/archive/2007/04/28/23100.htmlashuraashuraSat, 28 Apr 2007 04:25:00 GMThttp://m.shnenglu.com/ashura/archive/2007/04/28/23100.htmlhttp://m.shnenglu.com/ashura/comments/23100.htmlhttp://m.shnenglu.com/ashura/archive/2007/04/28/23100.html#Feedback1http://m.shnenglu.com/ashura/comments/commentRss/23100.htmlhttp://m.shnenglu.com/ashura/services/trackbacks/23100.html
縐嶇被 钄瘋枃縐?

鍒悕 鏃?

浜у湴 涓浗銆佹棩鏈佸彴婀?

鑺辮壊 鑺辮壊闄や簡綺夌孩鑹層佺孩銆佺櫧銆侀粍浠ュ鏈夎澶氬彉鑹插搧縐嶏紝涔熸湁鏉傝壊鍝佺

鑺辨湡 鏄ユ湯鑷崇瀛?

鑺辮 緹庛佺埍銆佹亱錛?

鐜懓鏈韓浠h〃鐖辨儏錛岀櫧鑹茬殑浠h〃錛氭垜灝婃暚浣狅紱綰㈣壊鐨勪唬琛細鐑亱錛涚孩鐧芥販鍚堜唬琛細鍜岃В錛涢粍鑹茬殑浠h〃瀚夊

閲嶇偣 鎯呬漢鑺傞佽姳錛岀帿鐟版槸蹇呯劧涔嬮夛紝浣嗚娉ㄦ剰涓嶅悓棰滆壊浠h〃鐨勪笉鍚屾剰鎬濄?

鐜懓鑻辨枃鍚峳ose錛屾簮浜庡笇鑵婅rode錛岀孩鑹茬殑鎰忔濄傛硶鍥介潻鍛藉悗鏂扮敓鐨勮吹濡囦漢錛屾嬁鐮翠粦鐨勫瀛愮害鐟熻姮錛屽湪宸撮粠閮婂鐨勭帥灝旀閫婂畢閭稿緩閫犱簡涓搴у畯浼熺殑鐜懓鍥紝騫跺懡浜哄埌嬈ф床鍙婁笘鐣屽悇鍦版悳闆嗙弽璐電殑鐜懓鍝佺錛涙嵁璇村湪濂圭殑鐜懓鍥噷縐嶆鐫涓変竾鏍帿鐟幫紝鑰屽ス鐨勮姳鍖犱篃鏄彶涓婄涓涓皾璇曚互浜哄伐鍩圭帿鐟拌姳縐嶇殑浜猴紝鎷滃ス涔嬭祼錛岀帿鐟拌繘鍏ヤ簡銆岃繎浠c嶃傜害鐟熻姮璇風敾瀹墮瞾閬撶壒綰綍鐜懓鍥噷鐜懓鐨勫Э鎬侊紝浣嗘槸鏈強瀹屾垚錛岀編浜哄嵈宸查娑堢帀孌掋傚叾鍚庨瞾閬撶壒鐨勭敾浠ャ庣帿鐟板浘璋便忓嚭鐗堟垚鍐岋紝鍥犺岃幏寰椼庣帿鐟扮敾瀹躲忕殑緹庡悕銆傞瞾閬撶壒綰ょ粏銆佷紭闆呯敾椋庯紝浼間箮姘歌繙姝岄鐫鐨囧綰︾憻鑺湭瀹屾垚鐨勬ⅵ錛屾瓕棰?nbsp; 闃呰鍏ㄦ枃

ashura 2007-04-28 12:25 鍙戣〃璇勮
]]>
C錛嬶紜涓殑鏂囦歡杈撳叆杈撳嚭嫻?/title><link>http://m.shnenglu.com/ashura/archive/2007/04/28/23091.html</link><dc:creator>ashura</dc:creator><author>ashura</author><pubDate>Sat, 28 Apr 2007 03:51:00 GMT</pubDate><guid>http://m.shnenglu.com/ashura/archive/2007/04/28/23091.html</guid><wfw:comment>http://m.shnenglu.com/ashura/comments/23091.html</wfw:comment><comments>http://m.shnenglu.com/ashura/archive/2007/04/28/23091.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.shnenglu.com/ashura/comments/commentRss/23091.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/ashura/services/trackbacks/23091.html</trackback:ping><description><![CDATA[     鎽樿:   C++涓殑鏂囦歡杈撳叆/杈撳嚭(3) 鍘熶綔錛欼lia Yordanov,  loobian@cpp-home.com   鎺屾彙杈撳叆/杈撳嚭嫻?  鍦ㄨ繖涓绔犻噷錛屾垜浼氭彁鍙婁竴浜涙湁鐢ㄧ殑鍑芥暟銆傛垜灝嗕負浣犳紨紺哄浣曟墦寮涓涓彲浠ュ悓鏃惰繘琛岃銆佸啓鎿嶄綔鐨勬枃浠訛紱姝ゅ錛屾垜榪樺皢涓轟綘浠嬬粛鍏跺畠鎵撳紑鏂囦歡鐨勬柟娉曪紝浠ュ強濡備綍鍒ゆ柇鎵撳紑鎿嶄綔鏄惁鎴愬姛銆傚洜姝わ紝璇鋒帴鐫寰涓嬭錛?鍒扮洰鍓嶄負姝紝鎴戝凡涓轟綘鎵...  <a href='http://m.shnenglu.com/ashura/archive/2007/04/28/23091.html'>闃呰鍏ㄦ枃</a><img src ="http://m.shnenglu.com/ashura/aggbug/23091.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/ashura/" target="_blank">ashura</a> 2007-04-28 11:51 <a href="http://m.shnenglu.com/ashura/archive/2007/04/28/23091.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>鍩哄洜鑺墖錛昏祫鏂欐暣鐞嗭冀http://m.shnenglu.com/ashura/archive/2007/04/28/23086.htmlashuraashuraSat, 28 Apr 2007 03:10:00 GMThttp://m.shnenglu.com/ashura/archive/2007/04/28/23086.htmlhttp://m.shnenglu.com/ashura/comments/23086.htmlhttp://m.shnenglu.com/ashura/archive/2007/04/28/23086.html#Feedback0http://m.shnenglu.com/ashura/comments/commentRss/23086.htmlhttp://m.shnenglu.com/ashura/services/trackbacks/23086.html 鐢熺墿鑺墖錛岀畝鍗曞湴璇村氨鏄湪涓鍧楁寚鐢插ぇ灝忥紙1cm3錛夌殑鏈夊鑱氳禆姘ㄩ吀鍖呰鐨勭鐗囦笂鎴栧叾瀹冨浐鐩告敮鎸佺墿錛堝鐜葷拑鐗囥佺鐗囥佽仛涓欑儻鑶溿佺閰哥氦緇寸礌鑶溿佸凹榫欒啘絳夛紝浣嗛渶緇忕壒孌婂鐞嗐備綔鍘熶綅鍚堟垚鐨勬敮鎸佺墿鍦ㄨ仛鍚堝弽搴斿墠瑕佸厛浣垮叾琛ㄩ潰琛嶇敓鍑虹緹鍩烘垨姘ㄥ熀錛堣鎵瑕佸浐瀹氱殑鍒嗗瓙涓烘牳閰告垨瀵¤偨鑰屽畾錛夊茍涓庝繚鎶ゅ熀寤虹珛鍏變環榪炴帴錛涗綔鐐規牱鐢ㄧ殑鏀寔鐗╀負浣垮叾琛ㄩ潰甯︿笂姝g數鑽蜂互鍚擱檮甯﹁礋鐢佃嵎鐨勬帰閽堝垎瀛愶紝閫氬父闇鍖呰浠ユ皚鍩虹鐑鋒垨澶氳仛璧栨皚閰哥瓑錛夊皢鐢熺墿鍒嗗瓙鎺㈤拡錛堝鏍歌嫹閰哥墖孌墊垨鍩哄洜鐗囨錛変互澶ц妯¢樀鍒楃殑褰㈠紡鎺掑竷錛屽艦鎴愬彲涓庣洰鐨勫垎瀛愶紙濡傚熀鍥狅級鐩鎬簰浣滅敤錛屼氦琛屽弽搴旂殑鍥虹浉琛ㄩ潰錛屽湪嬋鍏夌殑欏哄簭嬋鍙戜笅鏍囪鑽у厜鏍規嵁瀹為檯鍙嶅簲鎯呭喌鍒嗗埆鍛堢幇涓嶅悓鐨勮崸鍏夊彂灝勮氨寰侊紝CCD鐩告満鎴栨縺鍏夊叡鑱氱劍鏄懼井闀滄牴鎹叾娉㈤暱鍙婃嘗騫呯壒寰佹敹闆嗕俊鍙鳳紝浣滃嚭姣旇緝鍜屾嫻嬶紝浠庤岃繀閫熷緱鍑烘墍瑕佺殑淇℃伅銆傜敓鐗╄姱鐗囧寘鎷熀鍥犺姱鐗囥佽泲鐧借川鑺墖銆佺粍緇囪姱鐗囥傝屽熀鍥犺姱鐗囦腑錛屾渶鎴愬姛鐨勬槸DNA鑺墖錛屽嵆灝嗘棤鏁伴鍏堣璁″ソ鐨勫鏍歌嫹閰告垨cDNA鍦ㄨ姱鐗囦笂鍋氭垚鐐歸樀錛屼笌鏍峰搧涓悓婧愭牳閰稿垎瀛愭潅浜ょ殑鑺墖銆?nbsp; 闃呰鍏ㄦ枃

ashura 2007-04-28 11:10 鍙戣〃璇勮
]]>
C++鐨勪竴浜涘厤璐瑰簱http://m.shnenglu.com/ashura/archive/2007/04/24/22736.htmlashuraashuraTue, 24 Apr 2007 09:46:00 GMThttp://m.shnenglu.com/ashura/archive/2007/04/24/22736.htmlhttp://m.shnenglu.com/ashura/comments/22736.htmlhttp://m.shnenglu.com/ashura/archive/2007/04/24/22736.html#Feedback2http://m.shnenglu.com/ashura/comments/commentRss/22736.htmlhttp://m.shnenglu.com/ashura/services/trackbacks/22736.html
鍘熸枃錛欳++鐨勪竴浜涘厤璐瑰簱



//鏁寸悊 by RobinKin (鐜嬩寒)

  闃呰鍏ㄦ枃

ashura 2007-04-24 17:46 鍙戣〃璇勮
]]>
绱?/title><link>http://m.shnenglu.com/ashura/archive/2007/04/24/22734.html</link><dc:creator>ashura</dc:creator><author>ashura</author><pubDate>Tue, 24 Apr 2007 09:39:00 GMT</pubDate><guid>http://m.shnenglu.com/ashura/archive/2007/04/24/22734.html</guid><wfw:comment>http://m.shnenglu.com/ashura/comments/22734.html</wfw:comment><comments>http://m.shnenglu.com/ashura/archive/2007/04/24/22734.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.shnenglu.com/ashura/comments/commentRss/22734.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/ashura/services/trackbacks/22734.html</trackback:ping><description><![CDATA[鏈榪戝嚑澶╃湡鏄瘡<br>鐧藉ぉ澶勭悊鏁版嵁錛屾櫄涓婂啓紼嬪簭<br>浠婂ぉ鎵句簡涓悊鐢憋紝鍚冨畬鍗堥キ灝變粠瀹為獙瀹ゆ簻鍥炴潵浜?br>鍥炴潵鏈潵鎯崇戶緇啓紼嬪簭<br>鎹i紦浜嗕竴浼?br>鎾戜笉涓嬪幓<br>涓婂簥浜?br>韜轟簡涓涓灝忔椂錛屽眳鐒跺仛浜嗕笁涓ⅵ........濂囨殑姊?...<br><br>璁板緱姣旇緝娓呮鐨勪竴涓槸涓涓笉璁よ瘑鐨勫笀鍏勬嬁浜嗕竴鏈珻璇█×××榪欑被鐨勪功錛屽緢鏃э紝鍙垜鐪嬶紝鐒跺悗榪樼粰鎴戞紨紺轟簡涓涓鐞嗘暟鎹殑紼嬪簭<img src="http://m.shnenglu.com/CuteSoft_Client/CuteEditor/images/emcrook.gif" align=absMiddle border=0>鍚庢潵鎴戞帴浜嗕釜鐢佃瘽錛屼粬灝變笉璁蹭簡..... <img src ="http://m.shnenglu.com/ashura/aggbug/22734.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/ashura/" target="_blank">ashura</a> 2007-04-24 17:39 <a href="http://m.shnenglu.com/ashura/archive/2007/04/24/22734.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Gamehttp://m.shnenglu.com/ashura/archive/2007/04/20/22419.htmlashuraashuraFri, 20 Apr 2007 12:35:00 GMThttp://m.shnenglu.com/ashura/archive/2007/04/20/22419.htmlhttp://m.shnenglu.com/ashura/comments/22419.htmlhttp://m.shnenglu.com/ashura/archive/2007/04/20/22419.html#Feedback0http://m.shnenglu.com/ashura/comments/commentRss/22419.htmlhttp://m.shnenglu.com/ashura/services/trackbacks/22419.html鏈榪戝嚑澶╁父鐪嬪埌甯堝鍦ㄧ帺涓涓皬娓告垙錛?br>浠婂ぉ“緙?#8221;鐫甯堝鏁欐垜鐜?br>鐪嬪緱鍑哄笀濮愪笉鏄珮鎵媈.^
涓嶈繃甯堝鑻辮澶熺墰
榪欐槸涓嬭澆鍦板潃
http://www.jollybear.com/bigcityadventuresf/index.html

======================
鍥炲鏍″悗灞呯劧鐜╄繖涓父鎴忓埌鍗佷簩鐐瑰



ashura 2007-04-20 20:35 鍙戣〃璇勮
]]>
鐖北http://m.shnenglu.com/ashura/archive/2007/04/20/22407.htmlashuraashuraFri, 20 Apr 2007 11:37:00 GMThttp://m.shnenglu.com/ashura/archive/2007/04/20/22407.htmlhttp://m.shnenglu.com/ashura/comments/22407.htmlhttp://m.shnenglu.com/ashura/archive/2007/04/20/22407.html#Feedback0http://m.shnenglu.com/ashura/comments/commentRss/22407.htmlhttp://m.shnenglu.com/ashura/services/trackbacks/22407.html甯堝厔甯堝鐖北鍘諱簡
鍙垜涓璧峰幓
鎴戞病鍘?br>璺戝洖瀛︽牎coding浜員銆俆~~~~



ashura 2007-04-20 19:37 鍙戣〃璇勮
]]>
[杞琞濡備綍浣跨敤 <fstream> 綾昏繘琛屾枃浠剁殑 I/O 澶勭悊http://m.shnenglu.com/ashura/archive/2007/04/15/21970.htmlashuraashuraSun, 15 Apr 2007 13:26:00 GMThttp://m.shnenglu.com/ashura/archive/2007/04/15/21970.htmlhttp://m.shnenglu.com/ashura/comments/21970.htmlhttp://m.shnenglu.com/ashura/archive/2007/04/15/21970.html#Feedback0http://m.shnenglu.com/ashura/comments/commentRss/21970.htmlhttp://m.shnenglu.com/ashura/services/trackbacks/21970.html濡備綍浣跨敤 <fstream> 綾昏繘琛屾枃浠剁殑 I/O 澶勭悊

浣滆咃細Danny Kalev
緙栬瘧錛歁TT 宸ヤ綔瀹?/p>

涓嬭澆婧愪唬鐮?/font>
鍘熸枃鍑哄錛?a target=_blank>How to Use <fstream> Classes for File I/O

鎽樿錛?/strong>浼犵粺鐨勬枃浠?I/O 搴撳 Unix 鐨?<io.h> 鍜?<stdio.h> 錛岀敱浜庡叾紼嬪簭鎺ュ彛鐨勫師鍥狅紝鍦ㄥ緢澶х▼搴︿笂寮哄埗紼嬪簭鍛樿繘琛屾煇浜涘鐞嗭紝緙轟箯綾誨瀷瀹夊叏鍜屽浗闄呭寲鏀寔銆侰++ 鐨?<fstream> 搴撳垯鍦ㄦ枃浠剁殑 I/O 鏂歸潰鎻愪緵浜嗕竴涓寮虹殑銆侀潰鍚戝璞$殑銆佸叿鏈夊浗闄呭寲鎰忚瘑鐨勫簱銆傛湰鏂囧皢浠嬬粛濡備綍浣跨敤榪欎釜搴撹繘琛屾枃浠剁殑 I/O 澶勭悊騫跺埄鐢ㄥ畠鏉ョ紪鍐欐槗浜庤法騫沖彴鐨勪唬鐮併?/td>


銆銆澶у鏁?C++ 紼嬪簭鍛橀兘鐔熸倝涓嶆涓涓枃浠?I/O 搴撱傞鍏堟槸浼犵粺鐨?Unix 椋庢牸鐨勫簱錛屽畠鐢變竴浜涗綆綰у嚱鏁板 read() 鍜?open()緇勬垚銆傚叾嬈℃槸 ANSI C 鐨?<stdio.h> 搴擄紝瀹冨寘鍚?fopen() 鍜?fread()絳夊嚱鏁般傚叾瀹冪殑榪樻湁涓浜涘叿澶囨墍鏈夋潈鐨勫簱鎴栨鏋訛紝姣斿 MFC錛屽畠鏈夊緢澶氳嚜宸辯殑鏂囦歡澶勭悊綾匯?br>銆銆榪欎簺搴撲竴鑸兘寰堥毦璺ㄥ鉤鍙頒嬌鐢ㄣ傛洿緋熺殑鏄紝涓婅堪鎻愬埌鐨?C 搴撶敱浜庡叾紼嬪簭鎺ュ彛鐨勫師鍥狅紝鍦ㄥ緢澶х▼搴︿笂寮哄埗紼嬪簭鍛樿繘琛屾煇浜涘鐞嗭紝鑰屼笖緙轟箯綾誨瀷瀹夊叏鏀寔銆?br>銆銆鏍囧噯 C++ 鎻愪緵鎻愪緵浜嗕竴涓寮虹殑銆侀潰鍚戝璞$殑銆佸叿鏈夊浗闄呭寲鎰忚瘑鐨?nbsp; <fstream> 搴撱傝繖涓簱鍖呭惈涓緋誨垪媧劇敓浜庢爣鍑?ios_base 鍜?ios 綾葷殑綾繪ā鏉褲傚洜姝わ紝 <fstream> 鎻愪緵浜嗛珮綰х殑鑷姩鎺у埗鏈哄埗鍜屽仴澹с傛湰鏂囦笅闈㈠皢紺鴻寖濡備綍浣跨敤  <fstream> 綾誨疄鐜版枃浠剁殑杈撳叆/杈撳嚭澶勭悊錛?br>
絎竴姝ワ細鍒涘緩鏂囦歡嫻?br>銆銆杈撳叆鏂囦歡嫻侊紙ifstream錛夋敮鎸侀噸杞界殑 >> 鎿嶄綔絎︼紝鍚屾牱錛岃緭鍑烘枃浠舵祦錛坥fstream錛夋敮鎸侀噸杞界殑 << 鎿嶄綔絎︺傜粨鍚堜簡杈撳叆鍜岃緭鍑虹殑鏂囦歡嫻佽縐頒負 fstream銆備笅闈㈢殑紼嬪簭鍒涘緩浜嗕竴涓?ifstream 瀵硅薄錛歞ict錛屽茍灝嗚瀵硅薄涓殑姣忎竴涓崟瀛楁樉紺哄埌灞忓箷涓婏細

#include <iostream>
#include <string>
#include <fstream>
#include <cstdlib>
using namespace std;
int main()
{
string s;
cout<<"enter dictionary file: ";
cin>>s;
ifstream dict (s.c_str());
if (!dictionary) // were there any errors on opening?
exit(-1);
while (dictionary >> s) cout << s <<''\n'';
}      
銆銆鎴戜滑蹇呴』璋冪敤 string::c_str() 鎴愬憳鍑芥暟錛屽洜涓?fstream 瀵硅薄鍙帴鍙楀父閲忓瓧絎︿覆浣滀負鏂囦歡鍚嶃傚綋浣犲皢鏂囦歡鍚嶄綔涓哄弬鏁頒紶閫掓椂錛屾瀯閫犲嚱鏁拌瘯鍥炬墦寮鎸囧畾鐨勬枃浠躲傛帴鐫錛屾垜浠敤閲嶈澆鐨?錛佹搷浣滅鏉ユ鏌ユ枃浠剁殑鐘舵併傚鏋滃嚭閿欙紝璇ユ搷浣滅浼板間負 true銆傛渶鍚庝竴琛屾槸涓驚鐜紝姣忔鍙嶅閮戒粠鏂囦歡璇誨彇涓涓崟瀛楋紝灝嗗畠鎷瘋礉鍒?s錛岀劧鍚庢樉紺哄嚭鏉ャ傛敞鎰忔垜浠笉蹇呮樉寮忓湴媯鏌?EOF錛屽洜涓洪噸杞芥搷浣滅 >> 浼氳嚜鍔ㄥ鐞嗐傛澶栵紝鎴戜滑涓嶇敤鏄懼紡鍦板叧闂鏂囦歡錛屽洜涓烘瀽鏋勫嚱鏁頒細涓烘垜浠仛榪欎歡浜嬫儏銆?br>銆銆榪囨椂鍜岃崚搴熺殑 <fstream.h> 搴撴敮鎸?ios::nocreate 鍜?ios::noreplace 鏍囧織銆備絾鏂扮殑 <fstream> 搴撳凡緇忓彇浠d簡 <fstream.h> 騫朵笉鍐嶆敮鎸佽繖涓や釜鏍囧織銆?br> 
鏂囦歡鐨勬墦寮妯″紡
銆銆濡傛灉浣犱笉鏄懼紡鎸囧畾鎵撳紑妯″紡錛宖stream 綾誨皢浣跨敤榛樿鍊箋備緥濡傦紝ifstream 榛樿浠ヨ鏂瑰紡鎵撳紑鏌愪釜鏂囦歡騫跺皢鏂囦歡鎸囬拡緗負鏂囦歡鐨勫紑濮嬪銆備負浜嗗悜鏌愪釜鏂囦歡鍐欏叆鏁版嵁錛屼綘闇瑕佸垱寤轟竴涓?ofstream 瀵硅薄銆?lt;fstream> 瀹氫箟浜嗕笅鍒楁墦寮妯″紡鍜屾枃浠跺睘鎬э細
ios::app // 浠庡悗闈㈡坊鍔?
ios::ate // 鎵撳紑騫舵壘鍒版枃浠跺熬
ios::binary // 浜岃繘鍒舵ā寮?I/O (涓庢枃鏈ā寮忕浉瀵?
ios::in // 鍙鎵撳紑
ios::out // 鍐欐墦寮
ios::trunc // 灝嗘枃浠舵埅涓?0 闀垮害

浣犲彲浠ョ敤浣嶅煙鎿嶄綔絎?OR 緇勫悎榪欎簺鏍囧織錛?/p>

ofstream logfile("login.dat", ios::binary | ios::app);

fstream 綾誨瀷瀵硅薄鍚屾椂鏀寔璇誨拰鍐欐搷浣滐細

fstream logfile("database.dat", ios::in | ios::out);

絎簩姝ワ細璁劇疆鏂囦歡鐨勪綅緗?br>銆銆鏂囦歡鍏峰涓涓昏緫鎸囬拡錛屽畠鎸囧悜璇ユ枃浠朵腑鐨勬煇涓亸縐諱綅緗備綘鍙互閫氳繃璋冪敤seekp()鎴愬憳鍑芥暟錛屼互瀛楄妭涓哄崟浣嶅皢榪欎釜鎸囬拡瀹氫綅鍒版枃浠剁殑浠繪剰浣嶇疆銆備負浜嗚幏鍙栦粠鏂囦歡寮濮嬪鍒板綋鍓嶅亸縐葷殑瀛楄妭鏁幫紝璋冪敤seekp()鍗沖彲銆傚湪涓嬮潰鐨勪緥瀛愪腑錛岀▼搴忓皢鏂囦歡浣嶇疆鍓嶇Щ10涓瓧鑺傦紝鐒跺悗璋冪敤 tellp()鎶ュ憡鏂頒綅緗細

ofstream fout("parts.txt");
fout.seekp(10); // 浠?鍋忕Щ寮濮嬪墠榪?10 涓瓧鑺?
cout<<"new position: "<<fout.tellp(); // 鏄劇ず 10

浣犲彲浠ョ敤涓嬮潰鐨勫父閲忛噸鏂板畾浣嶆枃ian鎸囬拡錛?

ios::beg // 鏂囦歡寮濮嬩綅緗?
ios::cur // 褰撳墠浣嶇疆錛屼緥濡? ios::cur+5
ios::end // 鏂囦歡灝?/pre>

絎笁姝ワ細璇誨啓鏁版嵁
銆銆fstream 綾諱負鎵鏈夊唴寤烘暟鎹被鍨嬩互鍙?std::string 鍜?std::complex 綾誨瀷閲嶈澆 << 鍜?>> 鎿嶄綔絎︺備笅闈㈢殑渚嬪瓙紺鴻寖浜嗚繖浜涙搷浣滅鐨勪嬌鐢ㄦ柟娉曪細

fstream logfile("log.dat");
logfile<<time(0)<<"danny"<<''\n''; // 鍐欎竴鏉℃柊璁板綍
logfile.seekp(ios::beg); // 浣嶇疆閲嶇疆
logfile>>login>>user; // 璇誨彇浠ュ墠鍐欏叆鐨勫?/pre>


浣滆呯畝浠?/strong>
銆銆Danny Kalev 鏄竴鍚嶉氳繃璁よ瘉鐨勭郴緇熷垎鏋愬笀鍜岃蔣浠跺伐紼嬪笀錛屼笓鏀?C++ 鍜屽艦寮忚璦鐞嗚銆?997 騫村埌 2000 騫存湡闂達紝浠栨槸 C++ 鏍囧噯濮斿憳浼氭垚鍛樸傛渶榪戜粬浠ヤ紭寮傛垚緇╁畬鎴愪簡浠栧湪鏅氳璦瀛︾爺絀舵柟闈㈢殑紜曞+璁烘枃銆?涓氫綑鏃墮棿浠栧枩嬈㈠惉鍙ゅ吀闊充箰錛岄槄璇葷淮澶氬埄浜氭椂鏈熺殑鏂囧浣滃搧錛岀爺絀?Hittite銆丅asque 鍜?Irish Gaelic 榪欐牱鐨勮嚜鐒惰璦銆傚叾瀹冨叴瓚e寘鎷冨彜鍜屽湴鐞嗐侱anny 鏃跺父鍒頒竴浜?C++ 璁哄潧騫跺畾鏈熶負涓嶅悓鐨?C++ 緗戠珯鍜屾潅蹇楁挵鍐欐枃绔犮備粬榪樺湪鏁欒偛鏈烘瀯璁叉巿紼嬪簭璁捐璇█鍜屽簲鐢ㄨ璦璇劇▼銆?br>



ashura 2007-04-15 21:26 鍙戣〃璇勮
]]>[杞澆]VC++甯歌閿欒http://m.shnenglu.com/ashura/archive/2007/04/15/21969.htmlashuraashuraSun, 15 Apr 2007 13:24:00 GMThttp://m.shnenglu.com/ashura/archive/2007/04/15/21969.htmlhttp://m.shnenglu.com/ashura/comments/21969.htmlhttp://m.shnenglu.com/ashura/archive/2007/04/15/21969.html#Feedback0http://m.shnenglu.com/ashura/comments/commentRss/21969.htmlhttp://m.shnenglu.com/ashura/services/trackbacks/21969.htmlVisual C++ Error Messages

This page contains a listing of "difficult to diagnose" error messages and possible fixes. I haven't taught a programming class that uses Visual C++ in several years so this list is probably out of date by now.  It was valid for Microsoft Visual C++ version 6.0 service pack 3.

 

C1001: INTERNAL COMPILER ERROR (compiler file 'msc1.cpp', line 1786) Please choose the Technical Support command on the Visual C++ Help menu, or open the Technical Support help file for more information

This error results from leaving off the parentheses immediately following the function name in a function header.  To correct the error simply add () to the end of the function name.

 

C1010: unexpected end of file while looking for precompiled header directive

If your project is an MFC AppWizard created project then this error results from not #including StdAfx.h as the first 錛?span lang=EN-US>include statement (before any other 錛?span lang=EN-US>includes, data declarations, or executable program code).

 

C1083: Cannot open precompiled header file: 'Debug/<Project-Name>.pch': No such file or directory

This error results from a missing file - the compiled version of StdAfx.cpp. Visual C++ does a poor job of keeping track of this file and frequently "forgets" how to build it. This problem often occurs after restoring a saved workspace from diskette without the Debug directory. To fix the error select StdAfx.cpp from the workspace file list them choose Compile from the Build menu.  If that doesn't work the go to Project -> Settings, select the C/C++ tab, and click the radio button labeled Create Precompiled Headers.

 

C2001: newline in constant

This error is usually caused by a string or character constant that is missing its closing ' or " symbol.

C2065: '<data-member name>' : undeclared identifier

If this error occurs in one of your member functions then it is generally the result of forgetting the class scope operator in front of the function name in your .cpp file.

 

C2143: syntax error : missing ';' before 'PCH creation point'

Check each of the 錛?span lang=EN-US>include files to ensure that the closing brace of each class declaration is followed by a semicolon.

 


C2143: syntax error : missing ';' before '*'

If this error is followed by two C2501 errors then the problem is an undeclared class name within a pointer declaration.

For example, the declaration:

CClass *pObject;

will generate the above error message followed by a C2501 error message for 'CClass' and another C2501 message for 'pObject'.  The problem is that the compiler isn't recognizing CClass as a valid class/type name.  To correct the problem add a 錛?span lang=EN-US>i nclude of the file containing the declaration of CClass (e.g., 錛?span lang=EN-US>i nclude CClass.h)

 

C2447: missing function header (old-style formal list?)

This error usually results from a missing { or use of a ; instead of a { following the parameter list of a function header.

 

C2511: '<function-name>' : overloaded member function not found in '<class-name>'

This error results from a mismatch in the parameter list of a member function declaration (.h file) and definition (.ccp file). Check the forward declaration of the function in the .h file and its definition in the .cpp file and ensure that the number of parameters and the type of each parameter match exactly.

C2512: '<constructor-function-name>' : no appropriate default constructor available

This error usually occurs when you implement the constructor function of a derived class and forget to include parameter passing to the base class constructor function.   For example assume that CDerived is derived from CBase and that the CBase constructor function requires one parameter (e.g., int A).  If you define the CDerived constructor function as:

CDerived::CDerived(int A, int B) { ... }

the compiler will issue the above error message on the line containing the function header of CDerived::CDerived() because you haven't provided instructions for routing the parameter A to CBase::CBase().  Because you didn't provide instructions the compiler assumes that CBase::CBase() requires no arguments and it complains because no version of CBase::CBase() has been defined that accepts zero arguments.

If you intended to provide a version of CBase::CBase() that requires no arguments then the error message indicates that you forgot to declare that function in your base class declaration (e.g., in CBase.h).

If CBase::CBase() does require one or more arguments then you must correct the problem by including explicit instructions for passing parameters from the derived class constructor function to the base class constructor function.  The correction for the example above is:

CDerived::CDerived(int A, int B) : CBase(A) { ... }

 

C2556: '<function-name>' : overloaded functions only differ by return type
C2371: '<function-name>' : redefinition; different basic types

These errors usually result from a mismatch of function type between a .h and .cpp file. Check the forward declaration of the function in the .h file and its definition in the .cpp file and make the function return type identical in both files.

 

C2601: '<function-name>' : local function definitions are illegal

This error results from defining one function inside the body of another function.   It usually means that you omitted one or more } symbols in the function just before the function named in the error message.

C2653: '<Class-Name>' : is not a class or namespace name

This error usually results from not having 錛?span lang=EN-US>include "StdAfx.h" as the first 錛?span lang=EN-US>include statement in your class.cpp file.  It can also occur if your class definition is in a .h file and you forget to 錛?span lang=EN-US>include that .h file in another file that refers to the class name.

 

C2661: '<Class-Name>::<Function-Name>' : no overloaded function takes n parameters

This error indicates a mismatch between the parameters used in a function call (e.g., from main.cpp) and the declaration of the function.  The function call is passing n parameters and there is no function declaration that uses that number of parameters.

 

LNK1104: Cannot open file nafxcwd.lib

This error sometimes occurs when a project uses a class from the MFC but the project settings don't explicitly tell the link editor to look in the MFC libraries. 

Go to Project --> Settings (Build --> Settings in Visual C++ 4.0). On the General tab check the box that says "Use MFC in a Shared DLL".

 

LNK1168: cannot open Debug\<Project-Name>.exe for writing

This error occurs when the link editor attempts to write to a .exe file that is currently in use. The .exe file of an executing program is write protected until the program is terminated. Look at the status bar at the bottom of your screen and find the icon representing your executable application. Open the application and exit from it. Then select Build.

 

LNK2001: unresolved external symbol __endthreadex
LNK2001: unresolved external symbol __beginthreadex

These errors result from using an MFC object or function without telling the link editor to search the MFC libraries.

Go to Project --> Settings (Build --> Settings in Visual C++ 4.0). On the General tab check the box that says "Use MFC in a Shared DLL".

LNK2001: unresolved external symbol _main

Your project doesn't contain a function called main().  The error usually results from forgeting to add main.cpp to the project workspace.

 

<File>.obj : error LNK2001: unresolved external symbol "public: void __thiscall <Class1>::<Function1>(<Type>)"

This a generic form of a LNK2001 error where <File>.obj can be any object file in your project and <Class1>::<Function1>(<Type>) can be any function in any class.  Substitute the specific <File>, <Class>, <Function>, and <Type> in your message into the instructions below to diagnose and correct the problem.

An LNK2001 error means that the link editor is looking for a compiled function and can't find it.  The call to the "missing function" is somewhere in <File>.cpp. Unfortunately, double-clicking on the error message won't take you to the point in <File.cpp> where the function is called but you can search for it with Find or Find In Files.  The function the link editor can't find is a member of <Class>, its name is <Function1>, and its return type is <Type>.

There are two common reasons for a LNK2001 error:

1.        The call in <File>.cpp doesn't match the function prototype in <Class>.h and/or the implementation in <Class>.cpp.  The mismatch may be in the function name, return type, or number and/or type of parameters.   Correction strategies include:

o        Check that the function name is spelled the same (case sensitive) in all three files (File.cpp, Class.h, and Class.cpp).

o        Check that the function is actually declared and defined within <Class> - perhaps you defined it as a member of a different class or perhaps you tried to call the function (in <File>.cpp) using an object or object pointer of a different class.

o        Check that the number and type of parameters in the function implementation (in <Class>.cpp) matches the number and type of parameters declared in the function declaration in <Class>.h.

o        Check that the number and type of parameters in the function call (in <File>.cpp) matches the number and type of parameters declared in the function header in <Class>.cpp.

2.        The function was never declared or was declared but never defined.  To see if either is the case go to the ClassView window of the Workspace view.  Click the + next to <Class> and find <Function> in the list of member functions.

o        If <Function> is NOT in the list then it was never declared or defined - add a declaration to the class declaraion in <Class>.h and implement the function in <Class>.cpp.

If <Function> is in the list then right click on it and select Go To Definition from the pop-up menu.  If you get the error message Cannot find definition (implementation) of this function then the function was declared but never defined (implemented).  Implement the function to

o        <Class>.cpp.

 

LNK2005: <some-long-string-of-mostly-garbage> already defined in <name>.lib(<name>.obj)

This error usually results from including a source code file multiple times. If you recognize any of the names in the message then it probably results from multiple inclusion of one of your own header files. Check to be sure that you've used #ifndef/#define/#endif properly your header files. If you don't recognize the name then it's probably multiple inclusion of a system file (e.g., afxwin.h). Make sure that you haven't explicitly included something in main.cpp that is already included in one of your own header files.   Also check that you haven't 錛?/span>included a .cpp file where you should have 錛?/span>included a .h file



ashura 2007-04-15 21:24 鍙戣〃璇勮
]]>
青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
      <noscript id="pjuwb"></noscript>
            <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
              <dd id="pjuwb"></dd>
              <abbr id="pjuwb"></abbr>
              欧美一区二区三区的| 久久精品九九| 免费亚洲一区二区| 亚洲自拍高清| 99国产精品久久久久久久成人热| 国产免费观看久久黄| 欧美精品色一区二区三区| 久久久久久久尹人综合网亚洲| 一区二区三区成人| 亚洲九九九在线观看| 久久国产日韩欧美| 先锋影音网一区二区| 亚洲女女女同性video| 亚洲一区三区视频在线观看| 亚洲视频导航| 午夜欧美精品| 久久免费观看视频| 久久人人精品| 亚洲电影天堂av| 欧美va天堂在线| 亚洲人成在线播放网站岛国| 亚洲精品久久久久久久久久久| 欧美激情影院| 日韩午夜在线| 亚洲一区二区黄| 久久国产综合精品| 免费欧美视频| 亚洲精品久久久一区二区三区| 亚洲美女av在线播放| 一区二区三区日韩欧美精品| 亚洲欧美日本另类| 欧美大片免费观看| 亚洲精品乱码久久久久久久久 | 亚洲精品一区二区三区蜜桃久| 一区二区三区成人精品| 国产精品区二区三区日本| 欧美精品一区二区三区在线播放| 欧美在线免费观看| 欧美一区二区视频观看视频| 欧美成人精精品一区二区频| 亚洲视频在线观看三级| 欧美一区二区私人影院日本| 在线看视频不卡| 亚洲伦理在线| 亚洲欧美国产不卡| 久久综合电影| 一区二区欧美激情| 免费成人网www| 国产欧美日韩麻豆91| 国产欧美日韩综合| 精品va天堂亚洲国产| 9色porny自拍视频一区二区| 亚洲免费视频中文字幕| 亚洲国产高清在线观看视频| 欧美激情 亚洲a∨综合| 午夜欧美视频| 国产精品久久久久久久久久ktv | 免费观看亚洲视频大全| 亚洲国产精品一区制服丝袜| 亚洲欧美国产日韩天堂区| 国产精品sss| 亚洲综合二区| 亚洲欧美精品在线观看| 国产精品一香蕉国产线看观看| 亚洲一区二区不卡免费| 一区二区三区高清视频在线观看 | 久久综合综合久久综合| 雨宫琴音一区二区在线| 能在线观看的日韩av| 久久综合九色九九| 亚洲毛片av在线| 日韩视频二区| 国产精品盗摄久久久| 性欧美8khd高清极品| 亚洲一二三区精品| 国产日韩亚洲欧美| 欧美va天堂va视频va在线| 欧美久久视频| 性18欧美另类| 久久亚洲美女| 伊人久久大香线| 久久永久免费| 美日韩精品视频| 亚洲午夜三级在线| 亚洲欧美不卡| 在线不卡a资源高清| 亚洲精品欧美在线| 国产精品尤物| 免费成人av资源网| 欧美日韩情趣电影| 久久视频一区二区| 欧美日韩三级视频| 久久视频在线免费观看| 欧美激情1区2区| 久久成人精品无人区| 蜜臀av在线播放一区二区三区| 亚洲综合视频网| 六月婷婷一区| 亚洲欧美怡红院| 欧美不卡在线视频| 欧美主播一区二区三区| 欧美激情亚洲另类| 久久人体大胆视频| 国产精品久久久久久久久| 亚洲国产婷婷香蕉久久久久久99 | 亚洲午夜精品一区二区三区他趣| 黄色国产精品| 国产精品99久久久久久久久久久久| 黄色一区二区三区四区| 一本一本久久a久久精品综合麻豆| 在线看成人片| 性欧美1819性猛交| 亚洲欧美日韩精品久久亚洲区| 欧美aa国产视频| 久久久久久久999精品视频| 国产精品白丝av嫩草影院| 亚洲二区三区四区| 伊人成综合网伊人222| 小辣椒精品导航| 午夜精品一区二区三区电影天堂| 欧美日本久久| 亚洲激情啪啪| 亚洲国产精品久久久久婷婷884| 午夜欧美不卡精品aaaaa| 一区二区三区视频免费在线观看| 久久不射网站| 男同欧美伦乱| 狠狠久久亚洲欧美专区| 亚洲国产日韩一区| 欧美精品在线观看91| 久久婷婷国产综合国色天香 | 亚洲国产精品免费| 欧美在线你懂的| 蜜桃av噜噜一区| 欧美~级网站不卡| 欧美激情亚洲另类| 在线视频欧美一区| 亚洲一区二区三区视频播放| 亚洲一区综合| 国产精品久久久久久久浪潮网站| 在线观看精品一区| 夜夜嗨av色一区二区不卡| 欧美在线高清视频| 国产精品日韩一区二区三区| 亚洲高清不卡| 久色婷婷小香蕉久久| 亚洲资源av| 亚洲国产婷婷综合在线精品| 欧美成人免费小视频| 午夜久久资源| 久久综合狠狠综合久久综青草| 欧美日一区二区三区在线观看国产免| 欧美电影在线观看| 欧美中文字幕在线| av72成人在线| 在线精品一区二区| 国产精品www色诱视频| 欧美福利专区| 亚洲精品国产精品乱码不99 | 欧美日韩专区| 国产日韩一区欧美| 亚洲国产一区二区三区青草影视| 亚洲激情婷婷| 国产精品成人一区二区艾草| 99在线热播精品免费| 国产精品免费看久久久香蕉| 亚洲第一区中文99精品| 黄色在线一区| 国产亚洲欧美在线| 欧美一站二站| 久久中文在线| 国产精品美女久久久久久久| 欧美综合第一页| 亚洲欧美一区二区三区在线| 久久av二区| 中日韩高清电影网| 噜噜噜在线观看免费视频日韩| 欧美大片在线观看一区| 免费亚洲电影在线| 99在线热播精品免费| 国产一区二区三区免费观看| 欧美国产欧美亚州国产日韩mv天天看完整| 一本久道久久久| 欧美mv日韩mv国产网站app| 一区二区三区精品国产| 激情成人av| 国产伦精品一区二区三区免费迷| 欧美成人69av| 久久久www成人免费精品| 亚洲小说区图片区| 最新国产拍偷乱拍精品 | 在线播放亚洲| 国产精品一区在线播放| 欧美顶级少妇做爰| 久久精品国产99国产精品澳门| 一本综合精品| 亚洲国产三级网| 嫩草国产精品入口| 久久女同互慰一区二区三区| 欧美亚洲视频一区二区|