Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!panda!talcott!harvard!caip!seismo!rochester!mayer From: mayer@rochester.ARPA Newsgroups: net.lang.c++ Subject: stream package definition Message-ID: <17576@rochester.ARPA> Date: Thu, 24-Apr-86 21:48:02 EDT Article-I.D.: rocheste.17576 Posted: Thu Apr 24 21:48:02 1986 Date-Received: Sun, 27-Apr-86 07:18:02 EDT Sender: mayer@rochester.ARPA Organization: U of Rochester, CS Dept., Rochester, NY Lines: 33 From: Jim Mayer There is a minor problem in the definition of the "stream" package, as defined in the book and in the 1.0 release. Quoting from the book: class ostream { // ... public: ostream& operator<<(char *); ... }; This should really be: class ostream { // ... public: ostream& operator<<(const char *); ... }; The way it stands, I have to use "form" to get around the type checking, or coerce any constant character pointer arguments to (char *) before printing them. The change is upwards compatible with what is currently defined (I've tried it). Unfortunately, it doesn't seem possible to get around the problem with overloading either. -- Jim Mayer University of Rochester (arpa) mayer@Rochester.ARPA Department of Computer Science (uucp) rochester!mayer Ray P. Hylan Building (via allegra, decvax, or seismo) Rochester, New York 14627