io.h initially provided declarations for low-level input / output primitives in Unix and related constants and the like. Since quite a bit of code depended on it, many (most?) Compilers for other systems provided a header with the same name and some library functions that worked (at least mostly), as on Unix.
Windows.h is a (kind of) crude counterpart for Windows - a header that provides access to (declarations) for functions, constants, etc. for windows. The big difference is that Windows.h does a lot more than the basic low-level I / O covered by io.h , instead covering all the GUI functions, etc.
So: if you want to write code that does I / O at a fairly low level on Unix-like systems and can also be ported to other systems like Windows, you probably want to use io.h If you want to do system programming specifically for Windows, you will almost certainly want to use windows.h .
source share