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_39545167_22725.cpp: In function 'void read(T&)':
0_0_39545167_22725.cpp:11:17: error: there are no arguments to 'isdigit' that depend on a template parameter, so a declaration of 'isdigit' must be available [-fpermissive]
   11 |         for (; !isdigit(ch); ch = getchar()) if (ch == '-') sgn = -1;
      |                 ^~~~~~~
0_0_39545167_22725.cpp:11:17: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
0_0_39545167_22725.cpp:12:21: error: there are no arguments to 'isdigit' that depend on a template parameter, so a declaration of 'isdigit' must be available [-fpermissive]
   12 |         for (x = 0; isdigit(ch); ch = getchar()) x = x * 10 + ch - '0';
      |                     ^~~~~~~
0_0_39545167_22725.cpp: In instantiation of 'void read(T&) [with T = int]':
0_0_39545167_22725.cpp:18:6:   required from here
0_0_39545167_22725.cpp:11:24: error: 'isdigit' was not declared in this scope
   11 |         for (; !isdigit(ch); ch = getchar()) if (ch == '-') sgn = -1;
      |                 ~~~~~~~^~~~
0_0_39545167_22725.cpp:12:28: error: 'isdigit' was not declared in this scope
   12 |         for (x = 0; isdigit(ch); ch = getchar()) x = x * 10 + ch - '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-09-20 00:33:09, Gzip enabled