字符数组(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
相关文章
相关标签/搜索