Path: utzoo!attcan!uunet!brunix!sdm From: sdm@cs.brown.edu (Scott Meyers) Newsgroups: comp.lang.c++ Subject: cfront error message could use improvement Message-ID: <33825@brunix.UUCP> Date: 23 Mar 90 15:12:51 GMT Sender: news@brunix.UUCP Reply-To: sdm@cs.brown.edu (Scott Meyers) Organization: Brown University Department of Computer Science Lines: 34 Okay, so mystifying error messages are nothing to get excited about, but this one is so good I thought it might be of wider interest. Try passing a stream by value: #include void foo( ostream s ) // Oops -- meant ostream& { s << "Foo!"; } main() { foo( cout ); } Here's the error message: "streamvalue.C", line 11: error: ostream::ostream() cannot access ios::ios(): private member Things to note: 1. The line number given is the last line of the file. 2. One is left wondering how it is that one is trying to call a private constructor. 3. One begins to wonder why a constructor is private in the first place... Perhaps the error message gurus at AT&T could look into improving this kind of behavior in 2.1? Scott sdm@cs.brown.edu