我已经一年多没有用 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/