/ Vijos /

记录详情

Compile Error

/in/foo.cc: In function 'void read(T&)':
/in/foo.cc:20:12: error: there are no arguments to 'isdigit' that depend on a template parameter, so a declaration of 'isdigit' must be available [-fpermissive]
   20 |     while(!isdigit(c)){if(c=='-')flag=true;c=getchar();}
      |            ^~~~~~~
/in/foo.cc:20:12: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/in/foo.cc:21:11: error: there are no arguments to 'isdigit' that depend on a template parameter, so a declaration of 'isdigit' must be available [-fpermissive]
   21 |     while(isdigit(c)){x=(x<<1)+(x<<3)+(c^48);c=getchar();}
      |           ^~~~~~~
/in/foo.cc: In instantiation of 'void read(T&) [with T = int]':
/in/foo.cc:117:9:   required from here
/in/foo.cc:20:19: error: 'isdigit' was not declared in this scope
   20 |     while(!isdigit(c)){if(c=='-')flag=true;c=getchar();}
      |            ~~~~~~~^~~
/in/foo.cc:21:18: error: 'isdigit' was not declared in this scope
   21 |     while(isdigit(c)){x=(x<<1)+(x<<3)+(c^48);c=getchar();}
      |           ~~~~~~~^~~
/in/foo.cc: In instantiation of 'void read(T&) [with T = long long int]':
/in/foo.cc:120:17:   required from here
/in/foo.cc:20:19: error: 'isdigit' was not declared in this scope
   20 |     while(!isdigit(c)){if(c=='-')flag=true;c=getchar();}
      |            ~~~~~~~^~~
/in/foo.cc:21:18: error: 'isdigit' was not declared in this scope
   21 |     while(isdigit(c)){x=(x<<1)+(x<<3)+(c^48);c=getchar();}
      |           ~~~~~~~^~~

信息

递交者
类型
递交
题目
P1806 魔幻棋盘
语言
C++
递交时间
2026-10-28 22:23:43
评测时间
2026-10-28 22:23:43
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes