如题所述
用socket建立连接,收到指令后调用Shutdown执行关机。追问
可否麻烦发一下c++的程序内容
追答没有代码
温馨提示:答案为网友推荐,仅供参考
第1个回答 2012-12-04
#include<stdio.h>
#include<dos.h>
#include<stdlib.h>
int main()
{
char shut[8];
char b[81];
char choose;
printf("Hello, Welcome to the automatic shutdown procedures\n");
printf("Your Choose:\n");
printf("Y\tN\n");
scanf("%c",&choose);
if(choose=='Y')
{
printf("Please enter your desired automatic shutdown of time:");
scanf("%s",shut);
sprintf(b,"at %s shutdown -s",shut);
system(b);
}
return 0;
}本回答被提问者和网友采纳
#include<dos.h>
#include<stdlib.h>
int main()
{
char shut[8];
char b[81];
char choose;
printf("Hello, Welcome to the automatic shutdown procedures\n");
printf("Your Choose:\n");
printf("Y\tN\n");
scanf("%c",&choose);
if(choose=='Y')
{
printf("Please enter your desired automatic shutdown of time:");
scanf("%s",shut);
sprintf(b,"at %s shutdown -s",shut);
system(b);
}
return 0;
}本回答被提问者和网友采纳
第2个回答 2012-12-09
已经有了啊