开发者

when are characters stored in the Buffer

开发者 https://www.devze.com 2023-01-24 19:19 出处:网络
I just want to know when are characters that sb enter from the keyboard stored in the buffer? I mean : when the character key is pressed, or when enter is pressed, or there is another timing? my quest

I just want to know when are characters that sb enter from the keyboard stored in the buffer? I mean : when the character key is pressed, or when enter is pressed, or there is another timing? my question is especially for c++ Consol开发者_运维问答e apps, but it will be even better if the answers contained every case, or a general case!

thanks a lot :)


This will depend on the specific console in question.

Even though they are for different languages, same rules apply to as how the terminal/environment feeds your program with data on standard input:

  • How to read a single char from the console in Java (as the user types it)?
  • Why can't we read one character at a time from System.in?

This thread supposedly has a working example for Visual Studio.

0

精彩评论

暂无评论...
验证码 换一张
取 消