Hi,
I´ve made a program which should output som binary data. The problem is that more bytes than I specify gets out, and somehow the data seems a little corrupt. It´s only a problem under Windows, so I´ll guess it´s because there is some translation of bytes in the run. The code is:
Code:
bool ppmImage::WriteRaw(ostream& out){
int size;
if((width==0)&&(height==0)){return false;}
size=width;
size*=height;
size*=3;
out.write((const char*) data_p,size);
return true;
}
Is there a way I can specify, that output should be considered binary, like:
Code:
out.settype(BINARY);
or an equivalent function??