0
点赞
收藏
分享

微信扫一扫

189_string容器-构造函数

码农K 2022-06-28 阅读 118

189_string容器-构造函数_c++
189_string容器-构造函数_c++_02

#include <iostream>
#include <string>

using namespace std;

void test01()
{
string s1;
const char* str = "hello world";
string s2(str);
cout << "s2=" << s2 << endl;

string s3(10, 'a');
cout << "s3=" << s3 << endl;
}

int main()
{
test01();
return 0;
}

189_string容器-构造函数_c++_03


举报

相关推荐

0 条评论