B
Bovine
I've recently been using a class for directing output to both a file and
the screen. I copied it from this website:
http://www.talkaboutprogramming.com/group/comp.lang.c++/messages/812299.html
This works perfectly on windows platforms, but for some reason I can't get
it to compile on my SCO machine.
I get the following errors:
tee.h:27: syntax error before `('
tee.h:28: syntax error before `('
tee.h:29: syntax error before `('
and the lines of code this relates to are:
std::streambuf::int_type overflow(std::streambuf::int_type ch);
std::streambuf::int_type underflow();
std::streambuf::int_type sync();
I'm guessing that it doens't like the int_type return type, but I've no
idea why this would be.
If I remove the return type from the first method so it looks like this:
overflow(std::streambuf::int_type ch);
I get the following, slightly move helpful error messages:
tee.h:27: `int_type' is not a member of type `streambuf'
tee.h:27: parse error before `)'
tee.h:27: ANSI C++ forbids declaration `overflow' with no type
tee.h:28: syntax error before `('
tee.h:29: syntax error before `('
Are my libraries out of date and if so how do I find out?
Can anyone help?
For a full list of the code see the URL at the top of this message.
Thanks in advance!
the screen. I copied it from this website:
http://www.talkaboutprogramming.com/group/comp.lang.c++/messages/812299.html
This works perfectly on windows platforms, but for some reason I can't get
it to compile on my SCO machine.
I get the following errors:
tee.h:27: syntax error before `('
tee.h:28: syntax error before `('
tee.h:29: syntax error before `('
and the lines of code this relates to are:
std::streambuf::int_type overflow(std::streambuf::int_type ch);
std::streambuf::int_type underflow();
std::streambuf::int_type sync();
I'm guessing that it doens't like the int_type return type, but I've no
idea why this would be.
If I remove the return type from the first method so it looks like this:
overflow(std::streambuf::int_type ch);
I get the following, slightly move helpful error messages:
tee.h:27: `int_type' is not a member of type `streambuf'
tee.h:27: parse error before `)'
tee.h:27: ANSI C++ forbids declaration `overflow' with no type
tee.h:28: syntax error before `('
tee.h:29: syntax error before `('
Are my libraries out of date and if so how do I find out?
Can anyone help?
For a full list of the code see the URL at the top of this message.
Thanks in advance!