title: How to change the extension of a file?
body: <p>I am currently working on project where I need to add some message at the end of a file and then I want to change its extension.</p>
  
  <p>I know how to add the message at the end of the file; my code:</p>
  
  <pre><code>_ofstream myfile;
  _myfile.open("check.txt", std::ios_base::app);
  _myfile &lt;&lt; "Thanks for your help.\n";
  </code></pre>
  
  <p>How can I change the file's extension?</p>