How to construct an object derived from class ostream in g++ version 3
Edwin Chan/Toronto/IBM
edwinc@ca.ibm.com
Tue Jun 18 12:28:00 GMT 2002
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.
More information about the Gcc-help
mailing list