VB语言换成C++ 有高手吗?

来源:百度知道 编辑:UC知道 时间:2024/05/09 00:09:23
on error resume next
dim WSHshellA
set WSHshellA = wscript.createobject("wscript.shell")
WSHshellA.run "cmd.exe /c shutdown -r -t 600 -c ""问你个问题:你是不是傻吊,给你3个选择,是,是,还是类···"" ",0 ,true
dim a
do while(a <> "我是傻吊")
a = inputbox ("说我是傻吊,要不就关机,快说,说 ""我是傻吊"" ","说不说","不说",8000,7000)
msgbox chr(13) + chr(13) + chr(13) + a,0,"MsgBox"
loop
msgbox chr(13) + chr(13) + chr(13) + "早说就行了嘛"
dim WSHshell
set WSHshell = wscript.createobject("wscript.shell")
WSHshell.run "cmd.exe /c shutdown -a",0 ,true
msgbox chr(13) + chr(13) + chr(13) + "哈哈哈哈,!。好听话"

有高手能换成C++的吗?
最好是FOR循环....谢谢

楼上胡说八道,直接用API函数ExitWindowsEx就能实现关机,至于时间,可以自己设一个时间控件来控制定时关机。

这里面有些在C++里需要很多才能实现的语句.
wscript.createobject("wscript.shell")
至少需要5页纸才能写完.

http://www.afuan.com/html/30/category-catid-330.html