title: Ofstream create a file in Windows temp directory
body: <pre><code>ofstream batch;
  batch.open("olustur.bat", ios::out);
  batch &lt;&lt;"@echo off\n";
  batch.close();
  system("olustur.bat");
  </code></pre>
  
  <p>I want to create olustur.bat inside the Windows temp folder. I couldn't manage to achieve it. I am new to C++ so is this possible? If so, how?</p>