F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

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);
                                        ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-26 09:15:50, Gzip enabled