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_37295628_8144.cpp:6:1: error: expected unqualified-id before '{' token
 {
 ^
0_0_37295628_8144.cpp:9:2: error: 'a' does not name a type
 }a[100];
  ^
0_0_37295628_8144.cpp:10:11: error: expected ',' or '...' before '.' token
 bool cmp(s.a,s.b)
           ^
0_0_37295628_8144.cpp: In function 'bool cmp(s)':
0_0_37295628_8144.cpp:10:10: error: '<anonymous>' has incomplete type
 bool cmp(s.a,s.b)
          ^
0_0_37295628_8144.cpp:5:8: error: forward declaration of 'struct s'
 struct s;
        ^
0_0_37295628_8144.cpp:12:9: error: 'a' was not declared in this scope
  return a.num>b.num;
         ^
0_0_37295628_8144.cpp:12:15: error: 'b' was not declared in this scope
  return a.num>b.num;
               ^
0_0_37295628_8144.cpp: In function 'int main()':
0_0_37295628_8144.cpp:21:18: error: 'a' was not declared in this scope
    scanf("%s %d",a[i].color,&a[i].num)
                  ^
0_0_37295628_8144.cpp:23:8: error: 'a' was not declared in this scope
   sort(a,a+n,cmp);
        ^


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 08:21:06, Gzip enabled