The logic used for counting letters in a string is to treat it as an array and traverse it character by character by incrementing the index of the array till the end of string is reached.
Hope this solves ur purpose
Raghuram
If you're using a standard 'c' or 'c++' and they are normal null terminated strings then include <string.h> and do a strlen(pointertostring);
so, for example:
char *mystring = "The quick brown fox";
int length = strlen(mystring);
In Visual C++ you should use the System::String class and you can get the length as follows:
String mystring = new String("The quick brown fox");
int length = mystring->Length;
If you don't have the luxury of doing it this way, the loop for counting a string length is very simple;
char *mystring = "The quit brown fox";
int length = 0;
while(mystring[length] != '\0')
length++;
Hope this helps