R
Romain
Hello,
I am writing out a binary file. I figured that the number "10" is
automaticaly converted to "OD OA" instead of "OD". "OD" and "OA" are
line feed and carriage return.
I know it does that if the file is opened in something else than in
binary mode. But in my example below, the file is really opened in
binary.
I am compiling the file with VC++.NET
I am using 010 Editor to edit the binary file.
Thanks for your help,
Ctest2App::Ctest2App()
{
long i;
long Size=10;
LONG len=1;
ofstream *BinFile; // The acq file streams
PUCHAR *buf=new PUCHAR[Size];
BinFile = new ofstream("out.bin");
for (i =0; i < Size; i++) {
buf = new UCHAR[len];
buf[0]=10;
}
for (i =0; i < Size; i++) BinFile->write((char *) buf, len);
}
I am writing out a binary file. I figured that the number "10" is
automaticaly converted to "OD OA" instead of "OD". "OD" and "OA" are
line feed and carriage return.
I know it does that if the file is opened in something else than in
binary mode. But in my example below, the file is really opened in
binary.
I am compiling the file with VC++.NET
I am using 010 Editor to edit the binary file.
Thanks for your help,
Ctest2App::Ctest2App()
{
long i;
long Size=10;
LONG len=1;
ofstream *BinFile; // The acq file streams
PUCHAR *buf=new PUCHAR[Size];
BinFile = new ofstream("out.bin");
for (i =0; i < Size; i++) {
buf = new UCHAR[len];
buf[0]=10;
}
for (i =0; i < Size; i++) BinFile->write((char *) buf, len);
}