/ Vijos /

记录详情

Compile Error

foo.cc: In function 'const int Get_Int()':
foo.cc:11:29: error: 'undefined' was not declared in this scope
   11 | inline const int Get_Int() {undefined
      |                             ^~~~~~~~~
foo.cc:13:11: error: 'a' was not declared in this scope
   13 |      cin>>a;
      |           ^
foo.cc:16:15: error: expected ';' before 'if'
   16 |     {undefined
      |               ^
      |               ;
   17 |         if(a[i]>='0'&& a[i]<='9') //如果是数字.
      |         ~~     
foo.cc:14:9: warning: unused variable 'cnt_index' [-Wunused-variable]
   14 |     int cnt_index=0,cnt_int=0;
      |         ^~~~~~~~~
foo.cc: In function 'bool Check(int)':
foo.cc:29:5: error: 'undefined' was not declared in this scope
   29 |     undefined int tmp[10]= {0},cnt=0;
      |     ^~~~~~~~~
foo.cc:29:31: error: expected primary-expression before ',' token
   29 |     undefined int tmp[10]= {0},cnt=0;
      |                               ^
foo.cc:29:32: error: 'cnt' was not declared in this scope; did you mean 'int'?
   29 |     undefined int tmp[10]= {0},cnt=0;
      |                                ^~~
      |                                int
foo.cc:30:27: error: expected ';' before 'cnt'
   30 |     while(Date) {undefined
      |                           ^
      |                           ;
   31 |         cnt++;
      |         ~~~                
foo.cc:32:9: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   32 |         tmp[cnt]=Date%10;
      |         ^~~
      |         tm
foo.cc:36:12: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   36 |         if(tmp[i]!=tmp[9-i])return false;
      |            ^~~
      |            tm
foo.cc: In function 'int GetNext(int)':
foo.cc:41:5: error: 'undefined' was not declared in this scope
   41 |     undefined int tmp[10]= {0},cnt=0,Year=0,Month=0,Day=0;
      |     ^~~~~~~~~
foo.cc:41:31: error: expected primary-expression before ',' token
   41 |     undefined int tmp[10]= {0},cnt=0,Year=0,Month=0,Day=0;
      |                               ^
foo.cc:41:32: error: 'cnt' was not declared in this scope; did you mean 'int'?
   41 |     undefined int tmp[10]= {0},cnt=0,Year=0,Month=0,Day=0;
      |                                ^~~
      |                                int
foo.cc:41:38: error: 'Year' was not declared in this scope
   41 |     undefined int tmp[10]= {0},cnt=0,Year=0,Month=0,Day=0;
      |                                      ^~~~
foo.cc:41:45: error: 'Month' was not declared in this scope
   41 |     undefined int tmp[10]= {0},cnt=0,Year=0,Month=0,Day=0;
      |                                             ^~~~~
foo.cc:41:53: error: 'Day' was not declared in this scope
   41 |     undefined int tmp[10]= {0},cnt=0,Year=0,Month=0,Day=0;
      |                                                     ^~~
foo.cc:42:27: error: expected ';' before 'cnt'
   42 |     while(Date) {undefined
      |                           ^
      |                           ;
   43 |         cnt++;
      |         ~~~                
foo.cc:44:9: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   44 |         tmp[cnt]=Date%10;
      |         ^~~
      |         tm
foo.cc:48:30: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   48 |         if(i>=5)Year=Year*10+tmp[i];
      |                              ^~~
      |                              tm
foo.cc:49:37: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   49 |         else if(i>=3)Month=Month*10+tmp[i];
      |                                     ^~~
      |                                     tm
foo.cc:50:25: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   50 |         else Day=Day*10+tmp[i];
      |                         ^~~
      |                         tm
foo.cc:54:49: error: expected ';' before 'if'
   54 |     else if(Day==tmpMonthDays[Month]) {undefined
      |                                                 ^
      |                                                 ;
   55 |         if(Month!=12)Month++;
      |         ~~                                       
foo.cc:56:9: error: expected '}' before 'else'
   56 |         else {undefined
      |         ^~~~
foo.cc:54:39: note: to match this '{'
   54 |     else if(Day==tmpMonthDays[Month]) {undefined
      |                                       ^
foo.cc:56:24: error: expected ';' before 'Year'
   56 |         else {undefined
      |                        ^
      |                        ;
   57 |             Year++;
      |             ~~~~        
foo.cc:61:5: warning: no return statement in function returning non-void [-Wreturn-type]
   61 |     }
      |     ^
foo.cc: At global scope:
foo.cc:62:5: error: expected unqualified-id before 'return'
   62 |     return Year*10000+Month*100+Day;
      |     ^~~~~~
foo.cc:63:1: error: expected declaration before '}' token
   63 | }
      | ^
foo.cc: In function 'int main()':
foo.cc:67:5: error: 'undefined' was not declared in this scope
   67 |     undefined int n;
      |     ^~~~~~~~~
foo.cc:68:24: error: 'n' was not declared in this scope; did you mean 'yn'?
   68 |     while(~scanf("%d",&n))
      |                        ^
      |                        yn
foo.cc:69:15: error: expected ';' before 'int'
   69 |     {undefined
      |               ^
      |               ;
   70 |         int A[10]={0};
      |         ~~~    
foo.cc:72:19: error: expected ';' before 'for'
   72 |         {undefined
      |                   ^
      |                   ;
   73 | 
   74 |          for(int i=1; i<=12; i++)
      |          ~~~       
foo.cc:74:23: error: 'i' was not declared in this scope
   74 |          for(int i=1; i<=12; i++)
      |                       ^
foo.cc:82:23: error: expected ';' before 'A'
   82 |             {undefined
      |                       ^
      |                       ;
   83 | 
   84 |              A[k]=0;
      |              ~         
foo.cc:88:27: error: expected ';' before 'sum'
   88 |     while(true) {undefined
      |                           ^
      |                           ;
   89 |         sum+=Check(Now);
      |         ~~~                
foo.cc:94:7: error: 'A' was not declared in this scope
   94 |       A[k]=sum;
      |       ^
foo.cc:98:17: error: expected ';' before 'printf'
   98 |       {undefined
      |                 ^
      |                 ;
   99 |          printf("%d\n",A[i]);
      |          ~~~~~~  
foo.cc:101:7: error: 'A' was not declared in this scope
  101 |       A[10]={0};
      |       ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P2010 回文日期
语言
C++
递交时间
2022-03-23 16:10:51
评测时间
2022-03-23 16:10:51
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes