一种是char str1[] 另一种是string
#include<iostream> #include<string> using namespace std; int main() { char str1[] = "hello"; string str2 = "world"; cout<<str1<<endl; cout<<str2<<endl; return 0; }