Whats wrong in my code

string a;
getline(cin,a);
int len=a.length();
vector b;
for(int i=0;i<len;i++)
{
int j;
for(j=0;j<i;j++)
{
if(a[i]==a[j])
break;
}
if(i==j)
{
// cout<<a[i]<<" โ€œ;
b.push_back(a[i]);
}
}
for(int i=0;i<b.size();i++)
{
// cout<<b[i]<<โ€ โ€œ;
}
int c[b.size()];
for(int i=0;i<b.size();i++)
{
int m=0;
for(int j=0;j<a.length();j++)
{
if(a[j]==b[i])
m++;
}
// cout<<โ€œi:โ€<<i<<โ€โ€”>"<<m<<endl;
c[i]=m;
}
int n=sizeofยฉ/sizeof(int);
//cout<<โ€œn:โ€<<n<<endl;
//cout<<"c: โ€œ<<endl;
//for(int i=0;i<n;i++)
//{
// cout<<c[i]<<โ€ ";
//}
int max=c[0];
for(int i=1;i<n;i++)
{
if(c[i]>max)
{
max=c[i];
}
}
int i;
for(i=0;i<n;i++)
{
if(c[i]==max)
break;
}
cout<<b[i];

hello @manseerat ,
please share ur code using coding blocks ide.

I hope Iโ€™ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.