C++ standard libs errors
C++ standard libs errors
- Subject: C++ standard libs errors
- From: Krassimir Simeonov <email@hidden>
- Date: Sun, 7 Feb 2010 14:07:18 -0800
Hi,
When I run the following program on Win and Linux it produces output of
22
#include <iostream>
class MyStreamBuf : public std::streambuf
{
protected:
int overflow ( int c = EOF )
{
std::cout << static_cast<char>(c);
return c;
}
};
int main( int argc, char** argv )
{
std::cout << 2; // ok
MyStreamBuf myStreamBuf;
std::ostream myStream(&myStreamBuf);
myStream << 2; // exception
}
When I compile and run it in XCode (3.2.1 - MacOS X 10.6) it throws an exception when I try to call the operator <<(int).
I traced this to the point where myStream._M_num_put is NULL.
Does anyone know how to work around this issue?
Cheers,
k.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden