Receiving debugger notifications in the IDE; however the project compiles and runs fine. I have added flags for X0 in an attempt to remedy the problem (thinking debugger software might be pre-c++11), but that has not remedied the issue. I'm experiencing the issue with arrays directly, but have seen it occur with other data types. I have tried refreshing the index in the project and "freshening" the files. I'm also receiving an odd 'invalid overload of endl' notification. Code below is just for experimenting with the IDE. Errors located at every line with an array class function call and the cout
statements.
Any thoughts?
#include <iostream>
#include <array>
using namespace std;
int main()
{
array <double, 5> rainfall;
rainfall[0] = 2.3;
rainfall[1] = 0.3;
rainfall[2] = 0.0;
rainfall[3] = 4.1;
rainfall[4] = 0.5;
rainfall.at(5) = 7.2;
for(size_t x = 0; x < rainfall.size(); x++)
{
cout << rainfall[x] << endl;
}
for(size_t x = 0; x < rainfall.size(); x++)
{
cout << "Please enter a rainfall amount: " << endl;
cin >> rainfall[x];
}
for(size_t x = 0; x < rainfall.size(); x++)
{
cout << rainfall[x] << endl;
}
return 0;
}