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_20474698_5821.cpp:5:22: error: expected ',' or '...' before 'a'
 void quicksort(int[] a, int left, int right) {
                      ^
0_0_20474698_5821.cpp: In function 'void quicksort(int*)':
0_0_20474698_5821.cpp:6:25: error: invalid operands of types 'std::ios_base&(std::ios_base&)' and 'std::ios_base&(std::ios_base&)' to binary 'operator+'
     int mid = a[(left + right) >> 1];
                         ^
0_0_20474698_5821.cpp:7:13: error: invalid conversion from 'std::ios_base& (*)(std::ios_base&)' to 'int' [-fpermissive]
     int l = left;
             ^
0_0_20474698_5821.cpp:8:13: error: invalid conversion from 'std::ios_base& (*)(std::ios_base&)' to 'int' [-fpermissive]
     int r = right;
             ^
0_0_20474698_5821.cpp:14:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
     if (l < right) quicksort(a, l, right);
             ^
0_0_20474698_5821.cpp:14:41: error: too many arguments to function 'void quicksort(int*)'
     if (l < right) quicksort(a, l, right);
                                         ^
0_0_20474698_5821.cpp:5:6: note: declared here
 void quicksort(int[] a, int left, int right) {
      ^
0_0_20474698_5821.cpp:15:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
     if (left < r) quicksort(a, left, r);
                ^
0_0_20474698_5821.cpp:15:39: error: too many arguments to function 'void quicksort(int*)'
     if (left < r) quicksort(a, left, r);
                                       ^
0_0_20474698_5821.cpp:5:6: note: declared here
 void quicksort(int[] a, int left, int right) {
      ^
0_0_20474698_5821.cpp: In function 'int main()':
0_0_20474698_5821.cpp:24:24: error: too many arguments to function 'void quicksort(int*)'
         quicksort(a,1,n);
                        ^
0_0_20474698_5821.cpp:5:6: note: declared here
 void quicksort(int[] a, int left, int right) {
      ^


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-22 22:13:43, Gzip enabled