Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » included C++11 flag but still getting code errors (eclips set up)
included C++11 flag but still getting code errors [message #1083830] Sat, 10 August 2013 11:25 Go to next message
Eclipse UserFriend
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;
}
Re: included C++11 flag but still getting code errors [message #1084513 is a reply to message #1083830] Sun, 11 August 2013 13:44 Go to previous messageGo to next message
Eclipse UserFriend
Just to explain, just started using Eclips, is there a clear way to set this up so I can just build a project thats all I want, I want to set it up so I can build with C++11, thats all, if I switch tool perspective I loose the compiler settings this thing is driving me crazy... please help !!!!!!!!!!!!! I just want it to build my project, period!!!! and be able to add files to it etc.. how hard can you make it to add some file without loosing all my settings..... WTF (ooops sorry getting frustrated)...
Re: included C++11 flag but still getting code errors [message #1084538 is a reply to message #1084513] Sun, 11 August 2013 14:36 Go to previous messageGo to next message
Eclipse UserFriend
Also I am using gcc 4.7, g++ 4.7 and gnu, on Ubuntu 12.04, in all it seems to work fine but I just dont get the reason line 23, I think ""array <double, 5> rain;"" can not resolve array ??? if the #include <array> is ok??????

Re: included C++11 flag but still getting code errors [message #1084892 is a reply to message #1084538] Mon, 12 August 2013 03:29 Go to previous message
Eclipse UserFriend
http://wiki.eclipse.org/CDT/User/FAQ#CDT_does_not_recognize_C.2B.2B11_features
Previous Topic:Issue with binaries with Eclipse Kepler
Next Topic:Debugger isn't working
Goto Forum:
  


Current Time: Mon May 12 21:32:59 EDT 2025

Powered by FUDForum. Page generated in 0.03344 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top