title: CopyFile from one directory to another (C++)
body: <p>i'm working on Windows and i'm trying to simply move a file from one directory to another. 
  I use the method "CopyFile" but i have an issue whith the name of the file copied; i'm trying this:</p>
  
  <pre><code>#include &lt;windows.h&gt;
  #include &lt;stdio.h&gt;
  
  std::string source_path = "C:/ProgramData/RTD02/versions/versions.txt";
  std::string destination_path = "C:/ProgramData/RTD02/principale.txt";
  CopyFile(source_path.c_str(), destination_path.c_str(), 0);
  </code></pre>
  
  <p>In fact the content of the file "versions.txt" is well copied into the file "principale.txt". But what i want is also to change the name of file "principale.txt" to "versions.txt", i tried this one but it didn't work :</p>
  
  <pre><code> rename(destination_path.c_str(), source_path.c_str());
  </code></pre>
  
  <p>Thanks,</p>