带有向量的探测:C2589'常量':'::'右侧的非法令牌和C2760语法错误:意外令牌'(',预期的')'

时间:2018-11-24 02:58:13

标签: c++

任何人,请帮助我找出函数GetList中向量的错误。编译器给我错误C2589和C2760,但是当我单击错误时,它打开了一个名为“ vector”的选项卡:

void GetList(LISTCOMPETITOR &list)
{
    COMPETITOR cm;
    std::string next;
    do
    {
        std::cin >> cm;
        list.runner.push_back(cm);
        do
        {
            next[0] = '0';
            std::cout << std::endl << "Enter '1' if you want to keep adding runner or enter '0' to finish";
            getline(std::cin, next);
            if (next.length() > 1)
            {
                std::cout << std::endl << "Sorry! Please type only letter '1' or '0'.";
                continue;
            }
            if (next[0] == '1')
            {
                break;
            }
            return;
        } while (true);
    } while (next[0] == '1');
}

0 个答案:

没有答案