c++ - '.' token 之前的预期不合格 ID(C++ 错误)

标签 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;
        }
    }

最佳答案

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

关于c++ - '.' token 之前的预期不合格 ID(C++ 错误),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13885746/

相关文章:

c - 在GCC中编译C文件时出错(多个文件合而为一)

python - C++ Exprtk 与 Python eval()

java - 将按位运算 (i & 1) 从 C++ 转换为 Java

Java CircularArrayQueue isEmpty 方法

c++ - 在 Windows 7 64 位上使用 MySql 连接器设置 Code::Blocks

c - 在 CodeBlocks 中运行 ffmpeg 示例 c 程序时无法识别文件格式

c++ - 为什么我不能用子类的指针访问基类的公共(public)函数?

c# - 选择相机

python - 什么是交叉制表的良好数据模型?

MATLAB链表