title: How do I check if a const char*'s value is defined?
body: <p>My application reads settings from a conf file first, and then those options can be overwritten from the cli arguments. After it loads the settings from the conf, I need to check if the require values are set but I'm stuck at making it check the variables.</p>
  
  <p>Sample code:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main() {
  
  const char* test;
  
  if (test != NULL)
     std::cout &lt;&lt; test &lt;&lt; "\n";
  else
     std::cout &lt;&lt; "no value set\n";
  
  return 0;
  }
  </code></pre>
  
  <p>What did I do wrong?</p>