X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: "Anthony" Newsgroups: comp.os.msdos.djgpp Subject: Re: Why does this code fails? Date: Thu, 11 Mar 2004 14:36:15 +0300 Organization: Radio-MSU NOC, Moscow State University Lines: 15 Message-ID: References: NNTP-Posting-Host: integra.rmt.ru X-Trace: alpha2.radio-msu.net 1079004977 41086 81.13.30.150 (11 Mar 2004 11:36:17 GMT) X-Complaints-To: usenet AT radio-msu DOT net NNTP-Posting-Date: Thu, 11 Mar 2004 11:36:17 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com > Because there's no particular reason it should. Your new class > "mystream" has no relation to the standard C++ library classes, and > thus it inherits none of their overloaded operators. Ok, but it has the operator std::ostream&()! class Tiny { char i; public: operator int() const {return i;} }; works fine. What is the difference between mystream and Tiny (which is example from B. Stroustrup book)?