
When I Write Binary File. i had some problem
hi every one
i'm korean, because my english expression is poor
i write binary file
the source code is below
//--------------------------------------
#include <stdio.h>
#include <io.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <memory.h>
int main( )
{
char l_bbbuf[ 10 ];
memset( l_bbbuf, 0x0d, sizeof( l_bbbuf ) );
FILE* l_hFile;
l_hFile = fopen( "test.dat", "wb" );
for( int i = 0; i < 10 ; i++ )
fputc( l_bbbuf[i], l_hFile );
fclose( l_hFile );
Quote:
}
//------------------------------------------------
this is all. i want write 0x0d in file
after this program run, i open the "test.dat" and show hex
viewer the data.
that is 0x0d 0x0a 0x0d 0x0a......0x0a
i don't want write 0x0a..
what is the problem?
please help me...
sorry my english expression is so poor