delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2004/03/11/06:45:37.1

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: "Anthony" <akantsel AT integra DOT rmt DOT ru>
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: <c2pivh$183u$1@alpha2.radio-msu.net>
References: <c2phh0$17jb$1 AT alpha2 DOT radio-msu DOT net> <c2pi0v$ilm$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE>
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)?



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019