摘要: cpp11 引入了列表初始化,统一了对象的初始化方式,使得代码更加统一。 string a{"hello world"}; int a{"10"}; class A { int a; int b; }; A o{1, 2}; vector<int> v{1, 2, 3}; vector<string 阅读全文
posted @ 2023-03-29 16:08 xzsxzxs 阅读(15) 评论(0) 推荐(0) 编辑