nohairleft
Programmer
I am using Visual C++ version 6.0. I have a C console program that needs to output x-y coordinate information in binary. When I output a one byte value of 10 (0A Hex) the output file contains two bytes (0D and 0A). In ASCII the 0A would be defined as a line feed and 0D as a carriage return. I am forcing the data to be contained within a single byte by using the instruction fprintf(outfile, "%c", (coordinate & 0xFF)), where coordinate is defined as an int. This method works fine (no 0D is output) with the Borland compiler and also with GNU C on my LINUX box but the Microsoft compiler is 'seeing' the line feed and automatically outputting a carriage return with it. Is this a compiler option? Does anyone know how to surpress this unwanted carriage return from being written to my output file?