string.length() & strlen(char *)

qq_43363200發表於2020-10-11
c = "hello";	// type: char *
cout << strlen(c) << endl;

string s = "test";
cout << s.length() << endl; 

相關文章