I think it is also common to prompt the user to press Return to get the next "page" of output.

Hmm...yeah, that might be a better solution.
However, do you have any idea how many lines can be displayed in a normal-sized Linux Terminal or Windows Command Prompt, and are the number of lines the same (I guess probably not, eh?)?

I'm an alien from another world. Planet Earth is only my vacation home, and I'm not liking it.

Isn't Sleep (or "sleep()") a Windows-specific function? I was wanting my program that will use this to be cross-platform, and therefore I would like the method of slowing down output (if I decide to even use this approach) to be cross-platform as well.

I'm an alien from another world. Planet Earth is only my vacation home, and I'm not liking it.

There is a standard way to do what I was saying, posted here. But it sounds like the other thing is better, anyway. For a good console size, I don't think you can go wrong with 80 characters x 25 lines so just work around that.

There is a standard way to do what I was saying, posted here. But it sounds like the other thing is better, anyway. For a good console size, I don't think you can go wrong with 80 characters x 25 lines so just work around that.

Thanks.

I'm an alien from another world. Planet Earth is only my vacation home, and I'm not liking it.

Hmm...yeah, that might be a better solution.
However, do you have any idea how many lines can be displayed in a normal-sized Linux Terminal or Windows Command Prompt, and are the number of lines the same (I guess probably not, eh?)?

Not standard. It is configurable. The only way to know is to use Windows API, which you want to avoid in the first place.

Originally Posted by Programmer_P

Isn't Sleep (or "sleep()") a Windows-specific function? I was wanting my program that will use this to be cross-platform, and therefore I would like the method of slowing down output (if I decide to even use this approach) to be cross-platform as well.

It is. But there is no portable way of doing without wasting lots of cpu resources. You could just limit yourself to Windows and Linux.

Originally Posted by whiteflags

There is a standard way to do what I was saying, posted here. But it sounds like the other thing is better, anyway. For a good console size, I don't think you can go wrong with 80 characters x 25 lines so just work around that.

Why? WHY??? This is the very exact thing we suggest people avoid!
Delay loops are frowned upon, so why would you suggest it? I don't understand.

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.