Displaying 2 results from an estimated 2 matches for "changestandardstreamtobinari".
Did you mean:
changestandardstreamtobinary
2006 May 23
0
[LLVMdev] Binary output to cout on Windows
On Tue, 23 May 2006, Michael Smith wrote:
> The solution (provided in Microsoft's documentation) is to add:
> #include <cstdio>
> #include <io.h>
> #include <fcntl.h>
> and run:
> int result = _setmode( _fileno(stdin), _O_BINARY );
> if( result == -1 )
> { std::cerr<<"Cannot set input mode to binary."<<std::endl; return 1;
>
2006 May 23
3
[LLVMdev] Binary output to cout on Windows
The solution (provided in Microsoft's documentation) is to add:
#include <cstdio>
#include <io.h>
#include <fcntl.h>
and run:
int result = _setmode( _fileno(stdin), _O_BINARY );
if( result == -1 )
{ std::cerr<<"Cannot set input mode to binary."<<std::endl; return 1;
}
result = _setmode( _fileno(stdout), _O_BINARY );
if( result == -1 )
{