lundi 1 août 2022

How to initialize std::vector with std::array [closed]

codes like this can not compiled with Clang 13.1.6:

std::vector<std::array<std::string, 3>> params{
    {"1", "a", "a"},
    {"2", "b", "b"},
    {"3", "c", "c"}
};

tried also:

std::vector<std::array<std::string, 3>> params{
    ,
    ,
    
};

why? and how to make initialize works?

Aucun commentaire:

Enregistrer un commentaire