This minimal code example(this problem disturbs the ICQ-Client ickle, but the
code is much bigger, therefore I made this short example) worked well with
gcc 2.95 and 2.96.
After executing the program the command line showed:
a
a
With 3.11 I got
a
97
So the char is casted to an short, which I think is not correct.
greetings
Christian Borntr�ger
File attached and pasted
----------------------------------------------------------------------
#include <iostream>
#include <sstream>
using namespace std;
class testclass: public ostringstream {
public:
testclass& operator<<(char c);
};
testclass& testclass::operator<<(char c) {
ostringstream::operator<<(c);
}
int main () {
testclass t;
ostringstream o;
char a='a';
o<<a;
t<<a;
cerr<<o.str()<<endl;
cerr<<t.str()<<endl;
}
#include <iostream>
#include <sstream>
using namespace std;
class testclass: public ostringstream {
public:
testclass& operator<<(char c);
};
testclass& testclass::operator<<(char c) {
ostringstream::operator<<(c);
}
\
int main () {
testclass t;
ostringstream o;
char a='a';
o<<a;
t<<a;
cerr<<o.str()<<endl;
cerr<<t.str()<<endl;
}