在运行时暂停程序 [英] Pause a program while running
问题描述
嗨!
我正在运行一个C程序,需要暂停程序并更改一些
的变量。是否有任何函数检查标准输入缓冲区中是否有一个
字符,否则程序会继续运行
。有人可以请帮助我。
AN
Hi!
I am running a C program and need to pause the program and change some
of the variables. Is there any function that checks if there is a
character in the Standard Input Buffer, else the program keeps on
running. Can someone please help me on that.
AN
推荐答案
am ******** @ yahoo.com (Amit Nath)写道:
news:17 ** ************************@posting.google.c om:
am********@yahoo.com (Amit Nath) wrote in
news:17**************************@posting.google.c om:
嗨!
我正在运行一个C程序,需要暂停程序并更改一些变量。是否有任何函数检查标准输入缓冲区中是否有
字符,否则程序继续运行。有人可以请帮助我。
Hi!
I am running a C program and need to pause the program and change some
of the variables. Is there any function that checks if there is a
character in the Standard Input Buffer, else the program keeps on
running. Can someone please help me on that.
不,不是我想你想要的。您需要找到编译器提供的某些特定于平台的
函数来轮询。输入字符。这样的
函数在这里是偏离主题的,例如kbhit()for MS-DOS。
-
- 马克 - >
-
No, not like I think you want. You''ll need to find some platform-specific
function supplied by your compiler to "poll" for an input char. Such
functions are off-topic here, e.g. kbhit() for MS-DOS.
--
- Mark ->
--
在< Xn ******************************** @ 130.133.1.4 > Mark A. Odell < OD ******* @ hotmail.com>写道:
In <Xn********************************@130.133.1.4> "Mark A. Odell" <od*******@hotmail.com> writes:
am ******** @ yahoo.com(Amit Nath)写道:
新闻:17 ********** ****************@posting.google。 com:
am********@yahoo.com (Amit Nath) wrote in
news:17**************************@posting.google. com:
我正在运行一个C程序,需要暂停程序并更改一些变量。是否有任何函数检查标准输入缓冲区中是否有
字符,否则程序继续运行。有人可以请帮助我。
I am running a C program and need to pause the program and change some
of the variables. Is there any function that checks if there is a
character in the Standard Input Buffer, else the program keeps on
running. Can someone please help me on that.
不,不像我想你想要的那样。你需要找到编译器提供的一些特定于平台的功能来轮询。输入字符。这些
功能在这里是偏离主题的,例如,用于MS-DOS的kbhit()。
No, not like I think you want. You''ll need to find some platform-specific
function supplied by your compiler to "poll" for an input char. Such
functions are off-topic here, e.g. kbhit() for MS-DOS.
首先使用调试器可能是一个更好的选择,因为它没有... b $ b没有''需要对程序进行任何更改。
Dan
-
Dan Pop
DESY Zezhen,RZ集团
电子邮件: Da*****@ifh.de >
Da*****@cern.ch (Dan Pop)写道在新闻中:cb ********** @ sunnews.cern.ch:
Da*****@cern.ch (Dan Pop) wrote in news:cb**********@sunnews.cern.ch:
我正在运行一个C程序,需要暂停程序并更改一些变量。是否有任何函数检查标准输入缓冲区中是否有
字符,否则程序继续运行。有人可以请帮助我。
I am running a C program and need to pause the program and change some
of the variables. Is there any function that checks if there is a
character in the Standard Input Buffer, else the program keeps on
running. Can someone please help me on that.
不,不像我想你想要的那样。您需要找到编译器提供的某些特定于平台的函数来轮询。对于
输入字符。这些功能在这里是偏离主题的,例如,用于MS-DOS的kbhit()。
No, not like I think you want. You''ll need to find some
platform-specific function supplied by your compiler to "poll" for an
input char. Such functions are off-topic here, e.g. kbhit() for MS-DOS.
首先使用调试器可能是一个更好的选择,因为它不需要对程序进行任何更改。
Using a debugger is probably a better option in the first place, as it
doesn''t require any changes in the program.
同意。我原以为也许他想改变用户正常输入的变量
,比如使用向上箭头键来增加平均窗口
大小等等。
-
- 马克 - >
-
Agreed. I had thought maybe he wanted to change variables normally input
by a user, like using the up arrow key to increase an averaging window
size or something.
--
- Mark ->
--
这篇关于在运行时暂停程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!