You can make binary the Windows default by setting a global variable. I believe it's called _fmode. This would not help, of course, if your souce is compiled on a system with the text default. Quite frankly, the text mode thing is a serious bugaboo. The only time it is really necessary is when you are reading files written by another application. If you don't match that application's mode you will wind up with lines that don't wrap or lines that wrap twice, depending upon the direction of mismatch. The expected line endings for Windows, Mac, and *nix, for textual material, are CRLF, CR, and LF. It's unfortunate.