title: C++ getenv always returns null value
body: <p>I have just added the environment variable "DataDir", but  the getenv function still returns null value. </p>
  
  <p>Here is my code:
  const char *ret = getenv("DataDir");</p>
  
  <p>I restarted my computer and it done.</p>