+ 16
#include <iostream> #include <string> using namespace std; int main() { int length = 0; string str = "Hello"; for (const auto &i : str) if (i != '\0') ++length; cout << length; } [https://code.sololearn.com/c3XYgIzLHozG]
1st Oct 2017, 9:13 AM
Babak
Babak - avatar