title: C++ compiler: 'class std::vector<std::vector<char> >' has no member named 'emplace_back'
body: <p>I'm getting error from the compiler when coding C++. Here is my code:</p>
  
  <pre><code>#include &lt;iostream&gt;     
  #include &lt;algorithm&gt;   
  #include &lt;typeinfo&gt;
  #include &lt;string&gt;
  #include &lt;vector&gt;
  
  
  std::vector&lt; std::vector&lt;char&gt; &gt; p(std::vector&lt;char&gt; v)
  {
      std::vector&lt; std::vector&lt;char&gt; &gt; result;
  
      std::sort(v.begin(), v.end());
      do
      {
          result.emplace_back(v);
      }
      while(std::next_permutation(v.begin(), v.end()));
  
      return result;
  }
  </code></pre>
  
  <p>and here is my error:</p>
  
  <p><img src="https://i.stack.imgur.com/VMXNc.png" alt="enter image description here"></p>
  
  <p>Any idea what is causing this?</p>
  
  <p>I'm using Codeblocks 12.11, Windows 7 and my compiler is GNU GCC Compiler</p>
  
  <p>Thnx for the assist :) </p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>In case somebody bumps into the same problem, here is the solution (in Codeblocks 12.11):</p>
  
  <p>Go to:   Settings --> Compiler --> Compiler settings --> Check the following checkboxes:</p>
  
  <p><img src="https://i.stack.imgur.com/cqjro.png" alt="enter image description here"></p>
  
  <p>In addition to that remember to have a <code>main</code>-function in your code. Otherwise the compiler will give the following error:</p>
  
  <p><img src="https://i.stack.imgur.com/cyFRT.png" alt="enter image description here"></p>
  
  <p>The solution was given by the users who answered my post :) </p>