Why do I require multiple EOF (CTRL+Z) characters?

前端 未结 5 1624
误落风尘
误落风尘 2020-11-29 10:46

As a little background, I am quite new to the C Programming Language and as such have been attempting to work through some of the exercises in the second edition of the Kern

5条回答
  •  抹茶落季
    2020-11-29 11:34

    I'd guess standard input is line-buffered (it is on Unix). DOS had some getch() and getche() functions that are lower-level than stdio, so they bypass stdio buffering. I don't know how to disable input buffering on Windows, on Unix it's done by setting the terminal to non-canonical mode.

提交回复
热议问题