[lug] simple iostream bug?

Tom Tromey tromey at redhat.com
Thu Mar 14 17:10:19 MST 2002


>>>>> ">" == D Stimits <stimits at idcomm.com> writes:

>> ostream& TextHeader( ostream& web_output )
>> {
>>    web_output << "Content-type: text/html\n" << endl;
>>    return web_output;
>> }

This returns a reference to an ostream.

>>    cout << TextHeader( cout );

Here you are printing the reference to the ostream.

Try just:

    TextHeader (cout);

instead.

I don't understand why you see 0xffffffff.  I would expect some other
value.  Luckily I don't claim to be a C++ wizard.

Tom



More information about the LUG mailing list