title: create file on desktop in c++
body: <p>I know that to create a file in c++  we use following code</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;fstream&gt;
  using namespace std;
  int main()
  {
      ofstream out;
      out.open("exemple.txt");
      return 0;
  }
  </code></pre>
  
  <p>My question is the following, I want to create example.txt file on desktop or in an other directory. To simplify it let's take the desktop for now. </p>
  
  <p>Please help me how to do it?</p>
  
  <p>Like this?</p>
  
  <pre><code>out.open("example.txt","C:\Users\David\Desktop");
  </code></pre>