public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Edwin Chan/Toronto/IBM" <edwinc@ca.ibm.com>
To: gcc-help@gcc.gnu.org
Subject: How to construct an object derived from class ostream in g++ version 3
Date: Tue, 18 Jun 2002 12:28:00 -0000	[thread overview]
Message-ID: <OFAA37BDAD.09C912DB-ON85256BDC.006AD13E@torolab.ibm.com> (raw)

 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.

             reply	other threads:[~2002-06-18 19:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-18 12:28 Edwin Chan/Toronto/IBM [this message]
2002-06-18 15:35 ` Claudio Bley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=OFAA37BDAD.09C912DB-ON85256BDC.006AD13E@torolab.ibm.com \
    --to=edwinc@ca.ibm.com \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).