Your 3rd suggestion is the one I'd like to do. Why? because it's more challenging.
It's also a more complex solution. You will have to free the data manually and chances are you will forget, causing a memory leak. It's fine if you just want to mess around, but keep that in mind.
Originally Posted by Adak
io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
Originally Posted by Salem
You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.
Outside of your DOS world, your header file is meaningless.