0_0_14913731_24256.cpp: In function 'int main()':
0_0_14913731_24256.cpp:2:40: error: 'system' was not declared in this scope
int main(){system("title C语言关机程序");//设置cmd窗口标题system("mode con cols=48 lines=25");//窗口宽度高度system("color 0B");system("date /T");system("TIME /T");char cmd[20]="shutdown -s -t ";char t[5]="0";print();int c;scanf("%d",&c);getchar();switch(c){case 1:printf("您想在多少秒后自动关闭计算机?(0~600)\n");scanf("%s",t);system(strcat(cmd,t));break;case 2:system("shutdown -p");break;case 3:system("shutdown -l");break;case 0:break;default:printf("Error!\n");}system("pause");exit(0);
^
|