title: Initialize ofstream in constructor class, only working with c++11
body: <p>The following code compile flowlessly using</p>
  
  <pre><code>g++ -I. -std=c++0x -Wall -g -Werror *.cpp -o main
  </code></pre>
  
  <p>but without the -std=c++0x switch, it says</p>
  
  <pre><code>main.cpp: In constructor ‘Out&lt;T&gt;::Out(const string&amp;) [with T = double, std::string = std::basic_string&lt;char&gt;]’:
  main.cpp:274:42:   instantiated from here
  main.cpp:34:113: erreur: no matching function for call to ‘std::basic_ofstream&lt;char&gt;::basic_ofstream(const string&amp;, std::_Ios_Openmode)’
  main.cpp:34:113: note: candidates are:
  /usr/include/c++/4.6/fstream:629:7: note: std::basic_ofstream&lt;_CharT, _Traits&gt;::basic_ofstream(const char*, std::ios_base::openmode) [with _CharT = char, _Traits = std::char_traits&lt;char&gt;, std::ios_base::openmode = std::_Ios_Openmode]
  /usr/include/c++/4.6/fstream:629:7: note:   no known conversion for argument 1 from ‘const string {aka const std::basic_string&lt;char&gt;}’ to ‘const char*’
  /usr/include/c++/4.6/fstream:614:7: note: std::basic_ofstream&lt;_CharT, _Traits&gt;::basic_ofstream() [with _CharT = char, _Traits = std::char_traits&lt;char&gt;]
  /usr/include/c++/4.6/fstream:614:7: note:   candidate expects 0 arguments, 2 provided
  /usr/include/c++/4.6/fstream:588:11: note: std::basic_ofstream&lt;char&gt;::basic_ofstream(const std::basic_ofstream&lt;char&gt;&amp;)
  /usr/include/c++/4.6/fstream:588:11: note:   candidate expects 1 argument, 2 provided
  </code></pre>
  
  <p>How could I make it compile without the c++0x switch ?</p>
  
  <p>Code : </p>
  
  <pre><code>template &lt;typename T&gt;
  class Out
  {
      public:
          Out(const std::string&amp; outputFilename) : m_file(outputFilename, std::ios_base::out | std::ios_base::app) {}
  
          void write(const std::string &amp;text)
          {   m_file &lt;&lt; text &lt;&lt; "\n"; }
  
          void flush() { m_file &lt;&lt; std::flush; }
  
          void fake(T t) { std::cout &lt;&lt; t &lt;&lt; std::endl; }
  
      private:
          std::ofstream m_file;
  };
  </code></pre>