consider this for
int i.j;
for (i=0;i<=5;i++){
for (j=i+1;j<=5;j++){cout<<"\n"<<i<<"\t"<<j<<"\n";
}
}
now suppose we have
list<string>::iterator l,m;
the corresponding thing
for (l=0;l<=5;l++){
for (k=l+1;k<=5;k++){cout<<"\n"<<i<<"\t"<<j<<"\n";
}
}
won't work because "l+1" is meaningless here.
How do I solve this problem?