E
E
Evgeny Petryaev2021-05-01 14:08:37
Qt
Evgeny Petryaev, 2021-05-01 14:08:37

Incomprehensible bad_alloc?

vector<string> namescol;
    namescol.push_back("id");
    namescol.push_back("task");
    namescol.push_back("parent_task");
 QStringList list;
    QString qstr;
    for (int i = 0; i < namescol.size(); i++)
    {
        qstr = QString::fromStdString(namescol[i]);//тут ошибка std::bad_alloc, i==0
        list.push_back(qstr);
    }

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
LoliDeveloper, 2021-05-01
@Gremlin92

Check which libraries you are using. This usually happens due to the mixing of debug and release
. Googling in the blink of an eye.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question