赋值、拼接和附加 #include<iostream> #include<string> using namespace std; int main() { char charr1[100] = "hi "; char charr2[100] = "csdn"; char charr3[100]; string str1 = "hello "; string str2 = "world"