제출 #7634

#제출 시각아이디문제언어결과실행 시간메모리
7634aaaa로봇 (APIO13_robots)C++98
컴파일 에러
0 ms0 KiB
#define SUDO "/usr/bin/sudo" int main(void) { char *arg0;//this should be actual command itself char *arg1,*arg2,*arg3,*arg4; arg0 = "sudo"; arg1 = "shutdown"; arg2 = "-h"; arg3 = "01:30"; arg4 = (char *)NULL; excel(SUDO,arg0,arg1,arg2,arg3,arg4); sleep(60*60); return 0; }

컴파일 시 표준 에러 (stderr) 메시지

robots.cpp: In function 'int main()':
robots.cpp:6:8: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
robots.cpp:7:8: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
robots.cpp:8:8: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
robots.cpp:9:8: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
robots.cpp:10:16: error: 'NULL' was not declared in this scope
robots.cpp:11:36: error: 'excel' was not declared in this scope
robots.cpp:12:12: error: 'sleep' was not declared in this scope