【c++】用string类定义字符串数组

#include<iostream> #include<string> ​​​​​​​using namespace std; int main() { string str; cout<<"please input the str"<<endl; cin>>str; int n=str.length(); //  输出字符串长度 cout<<"str length:"<<n<<e
相关文章
相关标签/搜索