Using unformatted binary files under windows. This describes the areas in which windows is different from the usual standard. #include #include Under most versions of visual studio, nothing else needs to be changed, but you may get the occasional meaningless warning. Below is what windows officially expects. open should be spelled _open all the O_ flags should be spelled with _O_ protection when creating file may be one of _S_IREAD _S_IWRITE (which means read and write) example int f1 = _open("input.dat", _O_RDONLY | _O_BINARY); int f2 = _open("output.dat", _O_WRONLY | _O_CREAT | _O_TRUNC | _O_BINARY, _S_IWRITE); close should be spelled _close example _close(f2); read and write should also be spelled _read and _write