public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* How to construct an object derived from class ostream in g++ version 3
@ 2002-06-18 12:28 Edwin Chan/Toronto/IBM
  2002-06-18 15:35 ` Claudio Bley
  0 siblings, 1 reply; 2+ messages in thread
From: Edwin Chan/Toronto/IBM @ 2002-06-18 12:28 UTC (permalink / raw)
  To: gcc-help

 Here's a test file to show what I really meant.

#include <iostream.h>
class PageStream: virtual public ios, public ostream{
public:
   PageStream();
};
PageStream::PageStream(){}
int main(){return 0;}

This is the error message:

t.cpp: In constructor `PageStream::PageStream()':
t.cpp:11: no matching function for call to `std::basic_ostream<char,
std::char_traits<char> >::basic_ostream()'
/.../torolab.ibm.com/fs/projects/vabld/run/gcc/3.0.3/include/g++-v3/bits/std_ostream.h:177:

candidates are: std::basic_ostream<_CharT, _Traits>::basic_ostream(const
std::basic_ostream<_CharT, _Traits>&) [with _CharT = char, _Traits =
std::char_traits<char>]
/.../torolab.ibm.com/fs/projects/vabld/run/gcc/3.0.3/include/g++-v3/bits/std_ostream.h:67:

std::basic_ostream<_CharT, _Traits>::basic_ostream(std::basic_streambuf
<_CharT, _Traits>*) [with _CharT = char, _Traits = std::char_traits<char>]

What is required to match the function call? Is there something missing in
the constructor?

Thank you for your acknowledgement.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-06-18 22:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-18 12:28 How to construct an object derived from class ostream in g++ version 3 Edwin Chan/Toronto/IBM
2002-06-18 15:35 ` Claudio Bley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).