title: TEMP Environment variable expansion for C++ (Windows)
body: <p>I need to get a <code>%TEMP%</code> environmental variable value string in Windows platform. </p>
  
  <p>If I try to use any methods(C / C++) (<code>getenv()</code>, …) to get this environmental variable, it returns with <code>“~”</code> in that string.</p>
  
  <p>For Example: C:\DOCUME~1\pkp\LOCALS~1\Temp. </p>
  
  <p>But I need to get full string for some reasons, as below:</p>
  
  <p>C:\Documents and Settings\pkp\Local Settings\Temp</p>
  
  <p>If anyone knows any methodology to obtain this, please let me know.</p>