title: Using C-string gives Warning: "Address of stack memory associated with local variable returned"
body: <p>I am not a C programmer, so I am not that familiar with C-string but now I have to use a C library so here is a shortened version of my code to demonstrate my problem:</p>
  <pre><code>char** ReadLineImpl::my_completion () {
      char* matches[1];
      matches[0] = &quot;add&quot;;
  
      return matches;
  }
  </code></pre>
  <p>I am getting this warning:</p>
  <blockquote>
  <p>Warning - address of stack memory associated with local variable 'matches' returned</p>
  </blockquote>
  <p>And my program does not seem to work properly (might be because of the above mentioned warning).</p>
  <p>What does the warning imply? and will it cause any problems?</p>