我不斷收到此錯誤,我不知道爲什麼!請幫助預期在''之前的不合格id。令牌(C++錯誤)
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;
}
}
應該可能是'if(option =='1')' – Ari
哪一行? (填充) – 2012-12-14 20:27:06
你在哪一行得到錯誤?最好給予應該編譯的完整代碼。 – Mark