字符數組(char)和字符串(string)的轉換

#include<iostream> #include<string> using namespace std; void main() { string LyuS = "Welcome to learn C++"; const char *LyuC = LyuS.data(); //字符串轉換爲字符數組 cout << "LyuC :"<< LyuC << endl; for(int i = 0
相關文章
相關標籤/搜索