yeah....suppose
this will count the frequiences and hence u can know the frequency of each character and then give approriate error msg to the userCode:int freq[256]; ////possible alll characters....u might restrict the limit if u r using fixed set of chars for(int i=0;i<length;i++) freq[(int)s.at(i)]++
Note:
s is string
lenght is lenght of s
cheers