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_34842476_10328.cpp:16:17: error: reference to 'rank' is ambiguous
 bool com(struct rank a,struct rank b)
                 ^
0_0_34842476_10328.cpp:10:8: note: candidates are: struct rank
 struct rank
        ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/move.h:57:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_pair.h:59,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/utility:70,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:60,
                 from 0_0_34842476_10328.cpp:6:
GCC4.9.2/x86_64-w64-mingw32/include/c++/type_traits:1340:12: note:                 template<class> struct std::rank
     struct rank
            ^
0_0_34842476_10328.cpp:16:31: error: reference to 'rank' is ambiguous
 bool com(struct rank a,struct rank b)
                               ^
0_0_34842476_10328.cpp:10:8: note: candidates are: struct rank
 struct rank
        ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/move.h:57:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_pair.h:59,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/utility:70,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:60,
                 from 0_0_34842476_10328.cpp:6:
GCC4.9.2/x86_64-w64-mingw32/include/c++/type_traits:1340:12: note:                 template<class> struct std::rank
     struct rank
            ^
0_0_34842476_10328.cpp: In function 'bool com(int, int)':
0_0_34842476_10328.cpp:18:8: error: request for member 'num' in 'a', which is of non-class type 'int'
  if (a.num>b.num) return true;
        ^
0_0_34842476_10328.cpp:18:14: error: request for member 'num' in 'b', which is of non-class type 'int'
  if (a.num>b.num) return true;
              ^
0_0_34842476_10328.cpp:19:8: error: request for member 'num' in 'a', which is of non-class type 'int'
  if (a.num==b.num&&a.total<b.total) return true;
        ^
0_0_34842476_10328.cpp:19:15: error: request for member 'num' in 'b', which is of non-class type 'int'
  if (a.num==b.num&&a.total<b.total) return true;
               ^
0_0_34842476_10328.cpp:19:22: error: request for member 'total' in 'a', which is of non-class type 'int'
  if (a.num==b.num&&a.total<b.total) return true;
                      ^
0_0_34842476_10328.cpp:19:30: error: request for member 'total' in 'b', which is of non-class type 'int'
  if (a.num==b.num&&a.total<b.total) return true;
                              ^
0_0_34842476_10328.cpp:20:8: error: request for member 'num' in 'a', which is of non-class type 'int'
  if (a.num==b.num&&a.total==b.total&&strcmp(a.name1,b.name1)<=0) return true;
        ^
0_0_34842476_10328.cpp:20:15: error: request for member 'num' in 'b', which is of non-class type 'int'
  if (a.num==b.num&&a.total==b.total&&strcmp(a.name1,b.name1)<=0) return true;
               ^
0_0_34842476_10328.cpp:20:22: error: request for member 'total' in 'a', which is of non-class type 'int'
  if (a.num==b.num&&a.total==b.total&&strcmp(a.name1,b.name1)<=0) return true;
                      ^
0_0_34842476_10328.cpp:20:31: error: request for member 'total' in 'b', which is of non-class type 'int'
  if (a.num==b.num&&a.total==b.total&&strcmp(a.name1,b.name1)<=0) return true;
                               ^
0_0_34842476_10328.cpp:20:47: error: request for member 'name1' in 'a', which is of non-class type 'int'
  if (a.num==b.num&&a.total==b.total&&strcmp(a.name1,b.name1)<=0) return true;
                                               ^
0_0_34842476_10328.cpp:20:55: error: request for member 'name1' in 'b', which is of non-class type 'int'
  if (a.num==b.num&&a.total==b.total&&strcmp(a.name1,b.name1)<=0) return true;
                                                       ^
0_0_34842476_10328.cpp: In function 'int main()':
0_0_34842476_10328.cpp:28:9: error: reference to 'rank' is ambiguous
  struct rank p[1000];
         ^
0_0_34842476_10328.cpp:10:8: note: candidates are: struct rank
 struct rank
        ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/move.h:57:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_pair.h:59,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/utility:70,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:60,
                 from 0_0_34842476_10328.cpp:6:
GCC4.9.2/x86_64-w64-mingw32/include/c++/type_traits:1340:12: note:                 template<class> struct std::rank
     struct rank
            ^
0_0_34842476_10328.cpp:28:21: error: invalid type in declaration before ';' token
  struct rank p[1000];
                     ^
0_0_34842476_10328.cpp:31:25: error: request for member 'name1' in 'p[t]', which is of non-class type 'int'
  while (scanf("%s",p[t].name1)!=EOF)
                         ^
0_0_34842476_10328.cpp:33:8: error: request for member 'num' in 'p[t]', which is of non-class type 'int'
   p[t].num = 0,p[t].total = 0,k=0;
        ^
0_0_34842476_10328.cpp:33:21: error: request for member 'total' in 'p[t]', which is of non-class type 'int'
   p[t].num = 0,p[t].total = 0,k=0;
                     ^
0_0_34842476_10328.cpp:56:10: error: request for member 'total' in 'p[t]', which is of non-class type 'int'
     p[t].total+=(x+f*y);
          ^
0_0_34842476_10328.cpp:62:10: error: request for member 'total' in 'p[t]', which is of non-class type 'int'
     p[t].total+=x;
          ^
0_0_34842476_10328.cpp:65:8: error: request for member 'num' in 'p[t]', which is of non-class type 'int'
   p[t].num = k,t++;
        ^
0_0_34842476_10328.cpp:70:34: error: request for member 'name1' in 'p[i]', which is of non-class type 'int'
   printf ("%-10s %2d %4d\n",p[i].name1,p[i].num,p[i].total);
                                  ^
0_0_34842476_10328.cpp:70:45: error: request for member 'num' in 'p[i]', which is of non-class type 'int'
   printf ("%-10s %2d %4d\n",p[i].name1,p[i].num,p[i].total);
                                             ^
0_0_34842476_10328.cpp:70:54: error: request for member 'total' in 'p[i]', which is of non-class type 'int'
   printf ("%-10s %2d %4d\n",p[i].name1,p[i].num,p[i].total);
                                                      ^


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-25 19:18:09, Gzip enabled