c++中的字符串型

c++中有两种,c风格的

char str1[] = “hellow”

c++风格的

string str2 = “hello”

注意使用时加一个头文件

#include <string>
posted @ 2022-04-07 13:05  纸包鱼  阅读(44)  评论(0)    收藏  举报