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_19934912_30994.cpp: In function 'void vote()':
0_0_19934912_30994.cpp:39:27: error: 'memset' was not declared in this scope
 memset(cnt, 0, sizeof(cnt));
                           ^
0_0_19934912_30994.cpp:44:49: error: 'max_element' was not declared in this scope
 int max_cnt = *max_element(cnt + 1, cnt + 11 + 1), p = -1; 
                                                 ^
0_0_19934912_30994.cpp:45:48: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
 FOR(i,1,11) if (cnt[i] == max_cnt) { if (p == -1) p = i; else return;}
                                                ^
0_0_19934912_30994.cpp:45:53: error: incompatible types in assignment of 'int' to 'Person [12]'
 FOR(i,1,11) if (cnt[i] == max_cnt) { if (p == -1) p = i; else return;}
                                                     ^
0_0_19934912_30994.cpp:46:7: error: invalid conversion from 'Person*' to 'int' [-fpermissive]
 dead(p);
       ^
0_0_19934912_30994.cpp:30:6: note: initializing argument 1 of 'void dead(int)'
 void dead(int id)
      ^


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 01:46:23, Gzip enabled