列表初始化

在c++98/03裏有不少的對象初始化的方法: int i_arr[3]={1,2,3}; //數組 struct A{     int x;     struct B{ int i,j;     }b; }a={1,{2,3}}; //POD類型 //拷貝初始化 int i=0; class Foo{ public:     Foo(int){} }foo=123; /
相關文章
相關標籤/搜索