title: no matching function for call to `std::basic_ofstream<char, std::char_traits<char> >::basic_ofstream(std::string&)'
body: <p>I am trying to write a program that ask the user for a file name and then it opens that file.  When I compile it I get the following error: </p>
  
  <pre><code>no matching function for call to std::basic_ofstream&lt;char, 
  std::char_traits&lt;char&gt; &gt;::basic_ofstream(std::string&amp;)
  </code></pre>
  
  <p>This is my code:</p>
  
  <pre><code>using namespace std;
  
  int main()
  { 
      string asegurado;
      cout &lt;&lt; "Nombre a agregar: ";
      cin &gt;&gt; asegurado;
  
      ofstream entrada(asegurado,"");
      if (entrada.fail())
      {
          cout &lt;&lt; "El archivo no se creo correctamente" &lt;&lt; endl;
      }
  }      
  </code></pre>