Command line prompt doubt

Hi

I need to read a string from command line prompt and split it into two.. How can i find the length of the string...?

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()
Last edited on
Topic archived. No new replies allowed.