#include <iostream>
using namespace std;
int main()
{
string str_test = "helloworld";
cout << str_test.c_str() << endl;
return 0;
}
运行结果:
#include <iostream>
using namespace std;
int main()
{
string str_test = "helloworld";
cout << str_test.c_str() << endl;
return 0;
}
运行结果: