+ 2
How to get no of letters in a string
i want the answer but size of function doesn't do it
7 Respuestas
+ 16
string str = "Hello World';
cout << str.length();
or you can do it the Hatsy Rei way with <cstring>,
cout << strlen(str.c_str());
+ 11
Let's just say that strings are actually character arrays. Try to play around with them :>
If you still can't find out how, signal us on here.
+ 6
Pro Tip : You can treat strings like an array too.
+ 1
what is the method
@hatsy rei thanks
+ 1
i got it now.thanks for all
0
also how to get the nth char of a string
0
@wen quin how?