Array header problem in c++ , why we don't use it directly. Following message appears while using it... | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Array header problem in c++ , why we don't use it directly. Following message appears while using it...

[Error] #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options. [Error] 'array' was not declared in this scope /** @file bits/c++0x_warning.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{iosfwd} */ code is.. #include<iostream> #include<array> #include<iomanip> using namespace std; int main() { array<int, 5> n; for(size_t i=0; i<n.size(); ++i) { n[i]=0; } cout<<"Element"<<setw(10)<<"Value"<<endl; for(size_t j=0; j<n.size(); ++j) { cout<<setw(7)<<j<<setw(10)<<n[j]<<endl; } }

25th Jul 2022, 11:34 AM
Isbah
0 Answers