看不懂编译器给的错误
这是我的code:题目出处:https://zerojudge.tw/ShowProblem?problemid=c044
#include<iostream>
using namespace std;
void fn_a( int& times, int& finish )
{
int maxv=0;
char alpha[26]{ 'A','B','C','D','E','F','G','H','I','J','K','l','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z' };
for( int i=0; i<26; ++i )
if( maxv<times[i] ) maxv=times[i];
for( int i=0; i<26; ++i ){
if( times[i]==maxv ) cout << alpha[i] << ' ' << times[i] << endl;
times[i]=0;
finish++;
}
}
int main()
{
int n;
while( cin>>n ){
int times[26];
for( int i=0; i<26; ++i ) times[i]=0;
string sum="";
for( int i=0; i<n; ++i ){
string s;
cin >> s;
sum+=s;
}
int length=sum.length()-1;
for( int i=0; i<length; ++i ) times[sum[i]]++;
int finish=0;
while( finish<=26 )
fn_a( *times, *finish );
}
return 0;
}
编译器给的错误是什么意思啊?????!!!!!!
还一直重复出现,估计问题满大的