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_16716447_8443.cpp: In function 'int cmp(const void*, const void*)':
0_0_16716447_8443.cpp:19:7: error: request for member 'sum' in 'x', which is of pointer type 'STU* {aka student*}' (maybe you meant to use '->' ?)
  if(x.sum==y.sum)
       ^
0_0_16716447_8443.cpp:19:14: error: request for member 'sum' in 'y', which is of pointer type 'STU* {aka student*}' (maybe you meant to use '->' ?)
  if(x.sum==y.sum)
              ^
0_0_16716447_8443.cpp:21:12: error: request for member 'string' in 'x', which is of pointer type 'STU* {aka student*}' (maybe you meant to use '->' ?)
   return x.string-y.string;//考号升序
            ^
0_0_16716447_8443.cpp:21:21: error: request for member 'string' in 'y', which is of pointer type 'STU* {aka student*}' (maybe you meant to use '->' ?)
   return x.string-y.string;//考号升序
                     ^
0_0_16716447_8443.cpp:24:12: error: request for member 'sum' in 'y', which is of pointer type 'STU* {aka student*}' (maybe you meant to use '->' ?)
   return y.sum-x.sum;//成绩降序
            ^
0_0_16716447_8443.cpp:24:18: error: request for member 'sum' in 'x', which is of pointer type 'STU* {aka student*}' (maybe you meant to use '->' ?)
   return y.sum-x.sum;//成绩降序
                  ^


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-07-03 17:14:54, Gzip enabled