C++读取数组cin错误

标签 c++ arrays cin

我已经一年多没有用 c++ 编写代码了,我看不到这段代码中的错误。

它说 cin 函数有错误,没有这样的运算符 >>

int main()
{
    double * array[25];
    bool exitCode = false;
    cout <<"Enter in your Array"<<endl;
    do{
        for(int i = 0; i < 24; i++)
        {
            cout<< "Enter your float number";
            cin >> array[i];

            cout << "Are there any more inputs?: ( Y or N )";
            cin >> exitCode; // error is here
        }
    }while(exitCode == false);

    return array;
}

最佳答案

确保您包括以下内容:

<fstream>
<istream>
<iostream>
<string>

关于C++读取数组cin错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10201952/

相关文章:

c++ - 分析序列化代码

python - 在opencv python中加速每个像素循环

PHP MySQL 插入数组

c++ - 为什么 std::noskipws 不起作用,或者它应该做什么?

函数执行器中的 C++ 歧义,参数在 vector 中传递

c++ - setProperty() 返回 false

c++ - 无法在谷歌测试中检查异常类型

c++ - 查找总和除以给定数的数组的子数组数

c++ - cin.get() 获取太多

c++ - Cin 在 for 循环中使用后被跳过