主页: http://JK-Technology.Com 常见问题解答 comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html comp.lang.c ++ http://www.parashift.com/c++-faq-lite/ alt.comp.lang.learn.c-c ++ ftp ://snurse-l.org/pub/acllc-c++/faq 在这里,使用我的。 void block() { for(;;) } -Mike How do you create your own blocking function? Koo 解决方案 That''s a system call, not part of the language. The function often looks like this: #include <unistd.h> unsigned int sleep(unsigned int seconds); -Jeff That''s a system call, not part of the language. The function often looks like this: #include <unistd.h> unsigned int sleep(unsigned int seconds); -Jeff Nonsense, you can write a blocking function in perfectly standard C++. void blocking_function(void){while(1);} ....blocks extremely well. Unblocking is another issue. --Jack KleinHome: http://JK-Technology.ComFAQs forcomp.lang.c http://www.eskimo.com/~scs/C-faq/top.htmlcomp.lang.c++ http://www.parashift.com/c++-faq-lite/alt.comp.lang.learn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq Here, use mine. void block(){for(;;)} -Mike 这篇关于阻止功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-24 12:16