在'。'之前预期的不合格ID令牌(c ++错误)

时间:2012-12-14 20:25:46

标签: c++ data-structures codeblocks

我继续收到此错误,我不知道为什么!请帮忙

if(option = '1')
    {
        cout << "What word would you like to do a linear search for?" << endl;
        cin >> word;

        Search.linearSearch(250, word);
        if (comparisons >= true)
        {
            cout << "The word" << word << "was found!" << comparisons << "comparisons were made" << endl;
        }
        else
        {
            cout << "The word was not found" << endl;
        }
    }

1 个答案:

答案 0 :(得分:0)

您应该尝试使用Search :: linearSearch(250,word);