mercredi 24 avril 2019

Initializing a vector

I am using the following code

class test
{
public:
    test(std::vector<std::string> str)
    {
        auto a = str[0];
        a = "B";
    }
    test()
    {
    }
    const std::multimap<int,  std::multimap<int, test>> _var= {
        {0x01,  {
                    {
                        0x0f, std::vector<std::string>{"A", "B", "C", "D"}
                    }
        }
        }
    };
};

int main()
{
    test t;
}

The above code builds fine however i get the following error with the call stack. Any suggestions why I am getting that error ? or how I can fix it ?

enter image description here

Aucun commentaire:

Enregistrer un commentaire