how to upgrade gcc to c++11 in ubuntu? shall I face any problem after upgrading my present gcc? I am trying to run this code. `
int main()
{
using namespace std;
int n[5];
//cout << " please enter a character : ";
//cin >> x;
for(int m:n)
cout << m <<" ";
}
this is my warning.
1.cpp: In function ‘int main()’: 1.cpp:15:12: warning: range-based ‘for’ loops only available with -std=c++11 or -std=gnu++11 for(int m:n) ^