included C++11 flag but still getting code errors [message #1083830] |
Sat, 10 August 2013 11:25  |
Eclipse User |
|
|
|
new to using Eclips, running Linux enviroment, included the following flag -std=c++11 flags is sees the #include <array> BUT CAN NOT RESOLVE IN THE CODE ???? ANY IDEAS.
sample code:
#include <iostream>
#include <string>
#include <array>
using namespace std;
int main()
{
// double rain[5];
array <double, 5> rain;
rain[0] = 33.0;
rain[1] = 33.1;
rain[2] = 33.2;
rain[3] = 33.3;
rain[4] = 33.4;
// cout << "this is the output " << endl;
//<< rain[4] << endl;
for(int i =0; i < 5; i++)
{
cout << endl << "these are the current rain array entries"<< rain[i];
}
for(int i =0; i < 5; i++)
{
cout << "enter a value to fill the array "<< endl;
cin >> rain[i];
}
for(int i =0; i < 5; i++)
{
cout << endl << "the values entered are " << rain[i] ;
}
return 0;
}
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03344 seconds