13-C++11字符串初始化
4.3.1 C++11字符串初始化
正如您预期的,C++11也允许将列表初始化用于C-风格字符串和string对象:
char first_date[] = {"Le Chapon Dodu"};
char second_date[] {"The Elegant Plate"};
string third_date = {"The Bread Bowl"};
string fourth_date {"Hank's Fine Eats"};
正如您预期的,C++11也允许将列表初始化用于C-风格字符串和string对象:
char first_date[] = {"Le Chapon Dodu"};
char second_date[] {"The Elegant Plate"};
string third_date = {"The Bread Bowl"};
string fourth_date {"Hank's Fine Eats"};