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_39230719_20463.cpp: In function 'void fun(int, int)':
0_0_39230719_20463.cpp:27:17: error: 'scanf' was not declared in this scope
   27 |         for (; ~scanf("%s", items[p].name); p++) {//input//原本p是在这里声明,被抠出去了,输入到EOF为止
      |                 ^~~~~
0_0_39230719_20463.cpp:35:42: error: 'getchar' was not declared in this scope
   35 |                                 if ((c = getchar()) == '(') {//input//检测是否跟着一个括号
      |                                          ^~~~~~~
0_0_39230719_20463.cpp:3:1: note: 'getchar' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?
    2 | #include<string.h>
  +++ |+#include <cstdio>
    3 | using namespace std;
0_0_39230719_20463.cpp:41:51: error: 'stdin' was not declared in this scope
   41 |                                         ungetc(c, stdin);//input//没有括号则把读入的字符退回去,这个步骤似乎可以省略
      |                                                   ^~~~~
0_0_39230719_20463.cpp:41:51: note: 'stdin' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?
0_0_39230719_20463.cpp:41:41: error: 'ungetc' was not declared in this scope
   41 |                                         ungetc(c, stdin);//input//没有括号则把读入的字符退回去,这个步骤似乎可以省略
      |                                         ^~~~~~
0_0_39230719_20463.cpp:47:17: error: 'printf' was not declared in this scope
   47 |                 printf("%-10s %2d %4d\n", items[o].name, items[o].ac, items[o].pt);//output//顺手复习标准输出的格式化
      |                 ^~~~~~
0_0_39230719_20463.cpp:47:17: note: 'printf' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?
0_0_39230719_20463.cpp: In function 'int main()':
0_0_39230719_20463.cpp:55:9: error: 'scanf' was not declared in this scope
   55 |         scanf("%d%d", &N, &M);//input
      |         ^~~~~


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-16 14:46:49, Gzip enabled