This topic has been archived. It cannot be replied.
-
工作学习 / 专业技术讨论 / 讨论一个我不懂的C++问题:不急,谢谢.wcout << wstring1 <<endl;
cout << string1 <<endl;
这两个endl应该是不同的,如何实现的呢?
-iwantcar(流浪的EnjoyStudying);
2006-6-16
{90}
(#3032481@0)
-
ENDL 是不是作为一个参数传给COUT 和WCOUT?
-bobo123(bobo);
2006-6-19
(#3034846@0)
-
是反过来, output stream作为一个参数传给endl, 所以传递不同的ostream给endl, 根据polymorphism的原则,可以定义多个不同的endl 原型,每个endl 可以在各自的ostream中插入不同的内容。
-canadiantire(轮胎-cui bono?);
2006-6-19
(#3034922@0)
-
How? endl is a function or what? thanks.
-iwantcar(流浪的EnjoyStudying);
2006-6-19
(#3035073@0)
-
stream manipulator --- ostream& endl ( ostream& os );
-canadiantire(轮胎-cui bono?);
2006-6-19
(#3035076@0)
-
I guess the << of stream is very complex function. There are so many manipulators.
-iwantcar(流浪的EnjoyStudying);
2006-6-19
(#3035557@0)
-
endl应该是没有任何意义的吧,只是把输入的内容传送给string1或wstring1而已.
-billiken(香辣蟹);
2006-6-19
(#3035533@0)
-
endl is doing buffer flushing.It's not nothing!
-steven99ca(Don);
2006-6-28
(#3053071@0)
-
it depends.
-iwantcar(流浪的EnjoyStudying);
2006-6-28
(#3053101@0)
-
Depends on what ??? you tell me.funny!
-steven99ca(Don);
2006-7-5
(#3063367@0)
-
Generally speaking you are right. However, when you use it in file........read the link below, there is something about buffer.http://www.sunsite.ualberta.ca/Documentation/Gnu/libstdc++-2.90.8/html/27_io/howto.html
-iwantcar(流浪的EnjoyStudying);
2006-7-6
{87}
(#3064041@0)
-
你不是做driver的么?
-ccloafer(梦游加拿大);
2006-7-5
(#3064138@0)
-
惭愧,号称样样精通,实则.....
-iwantcar(流浪的EnjoyStudying);
2006-7-5
(#3064516@0)
-
You are really FUNNY (:D
-steven99ca(Don);
2006-7-6
(#3065532@0)
-
driver? 开出租还是机场接送的?搬家做不做?
-ccra(ccra);
2006-7-7
(#3066465@0)