C Program Run In Windows
Posted in 1999
Topics: General Discussion
Hi Everybody, Has anybody compile and run a unix c program under windows using C++ compiler of the microsoft visual studio 97. This program converts hex information to ascii. For some reason this program stops suddenly in windows without converting a whole file. This is not for all files. In unix all files are converted successfully. Hope to hear from you all Thanks in advance Hortencia System Analyst Belize Telecommunications Limited
Hi Hortencia, >Has anybody compile and run a unix c program under windows using C++ >compiler of the microsoft visual studio 97. This program converts hex >information to ascii. For some reason this program stops suddenly in >windows without converting a whole file. This is not for all files. >In unix all files are converted successfully. Sounds like you open your files in text-mode. When you do so reading will stop when the first ctrl-Z character is reached. You will also loose all your 0x0d-characters because of the CR+LF -> LF conversion. You should open your inputfile in binary mode: fopen ("your-inputfile", "rb"); Hope this helps. By(e) Paul