+ 1

how do you refer to the length of a string(the number of it's characters

9th Dec 2019, 12:49 PM
Barba lui iRaphahell
Barba lui iRaphahell - avatar
2 Answers
+ 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.
9th Dec 2019, 1:02 PM
šŸ‡®šŸ‡³OmkaršŸ•‰
šŸ‡®šŸ‡³OmkaršŸ•‰ - avatar
0
thanks
9th Dec 2019, 2:20 PM
Barba lui iRaphahell
Barba lui iRaphahell - avatar