std::tmpfile() not picking TMPDIR location
<p>I am using std::tmpfile() to create temporary files, but I want to use the location other than /tmp. I am exporting $TMPDIR to point to the new location, but std::tmpfile() doesn't pick the new location.</p>

<p>How to create temporary files with std::tmpfile() in a folder other than /tmp?  </p>