Getting a temporary file, cross-platform
<p>I'm looking for a cross-platform way of getting designated a temporary file. For example in linux that would be in the <code>/tmp</code> dir and in Windows in some crappy named Internet Explorer temp dir.</p>

<p>Does a cross-platform (Boost?) solution to this exist?</p>

<p><strong>EDIT</strong>:</p>

<p>I need this file to exist until the program terminates. <code>tmpfile()</code> does not guarantee that. Quoting from ccpreference:</p>

<blockquote>
  <p>The temporary file created is automatically deleted <strong>when the stream is closed (fclose)</strong>  or when the program terminates normally.</p>
</blockquote>
