+ 1
how do you refer to the length of a string(the number of it's characters
2 Réponses
+ 4
For C-style (array of chars) strings:
#include<cstring>
cout<<strlen(string_name);
For instances of std::string class:
#include<string>
cout<<string_name.length();
there are other ways also. you can search on net.
0
thanks