c风格字符串 char 变量[]=“字符串值”
string 变量名= “字符串值”;
#include<iostream>
#include<string> // 字符串头文件
using namespace std;
int main()
{
// c style 字符串 必须[]
// = 后面要用双引号
char str[] = "hello world";
cout << str << endl;
//c++ style 字符串 include 头文件
string str2 = "hello world";
cout << str2 << endl;
system("pause");
return 0;
}