Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 15:25 Go to next message
Jack Kowalski is currently offline Jack KowalskiFriend
Messages: 5
Registered: August 2013
Junior Member
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 17:44 Go to previous messageGo to next message
Jack Kowalski is currently offline Jack KowalskiFriend
Messages: 5
Registered: August 2013
Junior Member
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 18:36 Go to previous messageGo to next message
Jack Kowalski is currently offline Jack KowalskiFriend
Messages: 5
Registered: August 2013
Junior Member
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 07:29 Go to previous message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
http://wiki.eclipse.org/CDT/User/FAQ#CDT_does_not_recognize_C.2B.2B11_features

Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Previous Topic:Issue with binaries with Eclipse Kepler
Next Topic:Debugger isn't working
Goto Forum:
  


Current Time: Mon Jul 23 03:58:47 GMT 2018

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

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

Back to the top