请问一下为什么只能输出第一位字符
是哪里出错了
using namespace std;
#include<iostream>
#include<string.h>
char *maxc(char *s,int n)
{
// 在此处补充你的代码
char max;
max=s[0];
for(int i=0;i<n;i++){
if (max<=s[i]){max=s[i];
}
}
return s;
}int main()
{
char str[]="This is a string.";
cout<<*maxc(str,strlen(str))<<endl; //输出t
cout<<(++*maxc(str,strlen(str)))<<endl; //输出u
return 0;
}