Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

VC的怪問題!哪位高手能回答?

0 views
Skip to first unread message

摧殘幼小

unread,
Apr 16, 2003, 12:22:52 PM4/16/03
to
#include<fstream>
using namespace std ;
void main()
{
unsigned char a = 10;
ofstream fout("a.txt") ;
if (!fout) return ;
fout << a ;
fout.flush() ;
}

用 ultra edit 來開啟 a.txt 檔,
理論上來說,應該只有一個 0A 十六進位的輸出,
但是確跑出來了 0D 0A 兩個輸出!
請問這是怎麼一回事呢?
有誰能回答我?

--
我是風中的水滴
我看盡千萬風景
我遨翔過八方四海
我踏遍這巍巍江山
我不為何等美麗而暫留
也不為如此慌亂而匆匆

--
◎ [1;31m龍 [32m貓 [33m資 [34m訊 [35m天 [36m地 [0m( [1mbbs.mgt.ncu.edu.tw [0m)
◎[ [1;33;46mzsexdrcf [0m]From: 220206.D13-220.ncu.edu.tw

追憶似水年華

unread,
Apr 16, 2003, 1:20:14 PM4/16/03
to
※ 引述《zsexdr...@bbs.mgt.ncu.edu.tw (摧殘幼小)》之銘言:

> #include<fstream>
> using namespace std ;
> void main()
> {
> unsigned char a = 10;
> ofstream fout("a.txt") ;
> if (!fout) return ;
> fout << a ;
> fout.flush() ;
> }
> 用 ultra edit 來開啟 a.txt 檔,
> 理論上來說,應該只有一個 0A 十六進位的輸出,

哪個理論??願聞其詳??

> 但是確跑出來了 0D 0A 兩個輸出!
> 請問這是怎麼一回事呢?
> 有誰能回答我?

的確是OD OA沒有問題....


--

[1;33;41m[Master Chang.]______________________________________________ [m
[1;33;44m企鵝寶寶工作隊 | http://3ybaby.v-club.net/ [m
[1;33;44m請大家幫忙翻譯KDE | http://i18n.linux.org.tw/ [m
[1;33;44m全像光學實驗室 | http://www.ccit.edu.tw/~c3hog/master.html [m
[1;33;44m_____________________________________________________________ [m
--
[1;32m※ Origin: [33mSayYA 資訊站 [37m<bbs.sayya.org> [m
[1;31m◆ From: [36mh112-213.dorm5.ccit.edu.tw [m

0 new messages