是否有C ++功能来关闭计算机? [英] Is there a C++ function to turn off the computer?

查看:202
本文介绍了是否有C ++功能来关闭计算机?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有C ++功能关闭电脑?因为我怀疑有一个(在标准库中,至少),什么是Windows函数,我可以从C ++调用?

Is there a C++ function to turn off the computer? And since I doubt there is one (in the standard library, at least), what's the windows function that I can call from C++?

基本上,什么是代码

推荐答案

在Windows上,您可以使用ExitWindows函数,如下所示:

On windows you can use the ExitWindows function described here:

http://msdn.microsoft。 com / en-us / library / aa376868(VS.85).aspx

这里是一个指向示例代码的链接:

and here's a link to example code that does this:

http://msdn.microsoft .com / en-us / library / aa376871(VS.85).aspx

这篇关于是否有C ++功能来关闭计算机?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆