gpt4 book ai didi

c++ - 如何在 Win 32 上使程序在 C++ 中休眠?

转载 作者:IT老高 更新时间:2023-10-28 22:16:42 28 4
gpt4 key购买 nike

如何在 Win 32 上“暂停”C++ 中的程序,必须包含哪些库?

最佳答案

#include <windows.h>

Sleep(number of milliseconds);

或者,如果您想在等待另一个程序时暂停您的程序,请使用 WaitForSingleObject .

关于c++ - 如何在 Win 32 上使程序在 C++ 中休眠?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2252372/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com