Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!att!ulysses!andante!alice!ark From: ark@alice.UUCP (Andrew Koenig) Newsgroups: comp.lang.c++ Subject: Re: Arguments to Overloaded Operators Keywords: overloading Message-ID: <9485@alice.UUCP> Date: 14 Jun 89 13:51:57 GMT References: <11032@orstcs.CS.ORST.EDU> <1100@cadillac.CAD.MCC.COM> <5043@wiley.UUCP> Organization: AT&T Bell Laboratories, Liberty Corner NJ Lines: 22 In article <5043@wiley.UUCP>, simpson@trwarcadia.uucp (Scott Simpson) writes: > In article <884@tukki.jyu.fi> markku@jytko.jyu.fi (Markku Sakkinen) SAKKINEN@FINJYU.bitnet (alternative) writes: > >If you look at subsection 8.2.1 (page 227) of Stroustrup, > >you can see (among others) the output operator and function > > ostream& operator<<(int) { ... } > > ostream& put(char&); > >Guess why there isn't > > ostream& operator<<(char); > >instead of the put function! > > But in the GNU C++ library there is. There is in C++ 2.0 as well. cout << 'a'; finally prints `a' instead of `97'. -- --Andrew Koenig ark@europa.att.com