int main()
{
string str="abc1234567890a123dabc123456bb";
int x=1;
int flag=0;
char temp[100]={0};
temp[0]=str[0];
int size=0;
for(int i=1;i<strlen(str.c_str());i++)
{
for(int j=0;j<strlen(temp);j++)
{
if(str[i]==temp[j])
{
flag=1;
break;
}
}
if(!flag)
{
temp[x++]=str[i];
if(size<strlen(temp))
size=strlen(temp);
}
else
{
x=1;
cout<<"i="<<i<<endl;
cout<<"temp="<<temp<<endl;
memset(temp,0,sizeof(temp));
temp[0]=str[i];
}
flag=0;
}
cout<<"size="<<size<<endl;
return 0;
}