/ Vijos /

记录详情

Compile Error

/in/foo.cc: In function 'int win()':
/in/foo.cc:48:6: warning: unused variable 'i' [-Wunused-variable]
  int i,j,m;
      ^
/in/foo.cc:48:8: warning: unused variable 'j' [-Wunused-variable]
  int i,j,m;
        ^
/in/foo.cc: In function 'int judge()':
/in/foo.cc:61:5: error: reference to 'hash' is ambiguous
  if(hash[q]==1)
     ^~~~
/in/foo.cc:13:5: note: candidates are: int hash [262144]
 int hash[262144];
     ^~~~
In file included from /usr/include/c++/6/bits/basic_string.h:5643:0,
                 from /usr/include/c++/6/string:52,
                 from /usr/include/c++/6/bits/locale_classes.h:40,
                 from /usr/include/c++/6/bits/ios_base.h:41,
                 from /usr/include/c++/6/ios:42,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^~~~
/in/foo.cc:65:3: error: reference to 'hash' is ambiguous
   hash[q]=1;
   ^~~~
/in/foo.cc:13:5: note: candidates are: int hash [262144]
 int hash[262144];
     ^~~~
In file included from /usr/include/c++/6/bits/basic_string.h:5643:0,
                 from /usr/include/c++/6/string:52,
                 from /usr/include/c++/6/bits/locale_classes.h:40,
                 from /usr/include/c++/6/bits/ios_base.h:41,
                 from /usr/include/c++/6/ios:42,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^~~~
/in/foo.cc:57:6: warning: unused variable 'i' [-Wunused-variable]
  int i,j;
      ^
/in/foo.cc:57:8: warning: unused variable 'j' [-Wunused-variable]
  int i,j;
        ^
/in/foo.cc:59:6: warning: unused variable 'w' [-Wunused-variable]
  int w=8;
      ^
/in/foo.cc: At global scope:
/in/foo.cc:70:18: error: 'clock' does not name a type
 void print(const clock tp,int x)
                  ^~~~~
/in/foo.cc: In function 'void print(int, int)':
/in/foo.cc:74:40: error: request for member 'map' in 'tp', which is of non-class type 'const int'
  for(int i=1;i<=9;i++) printf("%d ",tp.map[i]);
                                        ^~~
/in/foo.cc:75:42: error: request for member 'father' in 'tp', which is of non-class type 'const int'
  printf("\nfather=%d step=%d no=%d\n",tp.father,tp.step,tp.no);
                                          ^~~~~~
/in/foo.cc:75:52: error: request for member 'step' in 'tp', which is of non-class type 'const int'
  printf("\nfather=%d step=%d no=%d\n",tp.father,tp.step,tp.no);
                                                    ^~~~
/in/foo.cc:75:60: error: request for member 'no' in 'tp', which is of non-class type 'const int'
  printf("\nfather=%d step=%d no=%d\n",tp.father,tp.step,tp.no);
                                                            ^~
/in/foo.cc: In function 'int main()':
/in/foo.cc:133:2: error: reference to 'hash' is ambiguous
  hash[n]=1; 
  ^~~~
/in/foo.cc:13:5: note: candidates are: int hash [262144]
 int hash[262144];
     ^~~~
In file included from /usr/include/c++/6/bits/basic_string.h:5643:0,
                 from /usr/include/c++/6/string:52,
                 from /usr/include/c++/6/bits/locale_classes.h:40,
                 from /usr/include/c++/6/bits/ios_base.h:41,
                 from /usr/include/c++/6/ios:42,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^~~~
/in/foo.cc:126:8: warning: unused variable 'j' [-Wunused-variable]
  int i,j;
        ^
/in/foo.cc: In function 'int judge()':
/in/foo.cc:68:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^

信息

递交者
类型
递交
题目
P1016 北京2008的挂钟
语言
C++
递交时间
2018-08-02 21:55:57
评测时间
2018-08-02 21:55:57
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes