well if it's a c style string, as in char *chZ; then you'll have to keep track of how many elements is added to it, or use the strlen function. if it's a c++ style string, as in string strZ;, which is more likely. then you'd use the method "string::length()", which is implemented using my example from above as such int strLen = strZ.length()