【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
相關文章
相關標籤/搜索