摘要:
string str = "sdfsdfsd1234fsdf"; cout << str.size() << endl; cout << str.insert(str.size(), "123") << endl; cout << str.find("123") << endl; cout << str.substr(0, 4) << endl; cou... 阅读全文
摘要:
char str[] = "123"; // strlen 只计算可见字符, sizeof 则包含'\0' 在内 cout << "strlen : " << strlen(str) << endl; cout << "sizeof :" << sizeof(str) << endl; char name[10]; char name1[10]; ... 阅读全文