title: how to enable c++11 in linux
body: <p>I wanted to use the unordered_map STL in c++, but as soon as I use the header, it gives me this error:</p>
  
  <p>This file requires support for the compiler and library support for the ISO C++11 standard. This support is currently experimental and must be enabled with -std=c++11 or -std=gnu++11 compiler options.</p>
  
  <p>I am attaching my code that I wanted to run, below. (Any inputs on the code are welcome too. thanks)</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;unordered_map&gt;
  using namespace std;
  
  class Node
  {
  public:
  string a,b;
  Node()
  {
      a="hello";
      b="world";
  }
  };
  
  
  int main ()
  {
      unordered_map&lt;Node&gt; mymap;
      Node mynode;
      mymap.insert(mynode);
      std::cout &lt;&lt; "myrecipe contains:" &lt;&lt; std::endl;
    for (auto&amp; x: mymap)
      std::cout &lt;&lt; x.a &lt;&lt; ": " &lt;&lt; x.b &lt;&lt; std::endl;
  
  }
  </code></pre>
  
  <p>Edit: I got it to work by using the following commmand: g++ -std=c++11 [filename].cpp</p>
  
  <p>Thanks for the help.</p>