this is the answer about the count:
int counter (string s){
count=0;
for (int i=1;int i<s.length();i++)
count ++;
return count;
}
No offense but this was worthless.How about using the s.length().
It already is a function that returns the number of character. And your counter has bugs.
Last edited by firstPerson; Sep 18th, 2009 at 8:46 pm.
Reputation Points: 840
Solved Threads: 594
Senior Poster
Offline 3,865 posts
since Dec 2008