Spoof源代码——第二章

用C++编一个关机的程序,也可以和你的朋友开下玩笑

#include
using namespace std;
void main()
{
system(“cmd /c shutdown -s -t 60”); //这是调用cmd
system(“pause”);
}
相信这很简单吧!
还有个方法
#include
#include<shlobj.h>
#include<shellapi.h>
using namespace std;
void main()
{
ShellExecute(NULL,“open”,“cmd.EⅩE”,"/c shutdown -s -t 60",NULL,SW_HIDE);
system(“pause”);

}  
呵呵  自己试一试吧,不错哦~~

猜你喜欢

转载自blog.csdn.net/ebirth/article/details/89279857