title: got <null> using printf with string
body: <p>When using printf for string, I got :</p>
  
  <pre><code>string key = "123";
  printf("Value is %s \n", key);
  </code></pre>
  
  <blockquote>
    <p>// output is: Value is &lt; null ></p>
  </blockquote>
  
  <p>But if I do it like this:</p>
  
  <pre><code>string key = "123";
  printf("Value is: ");
  printf(key.c_str());
  </code></pre>
  
  <p>then I get:</p>
  
  <blockquote>
    <p>// output is: Value is 123</p>
  </blockquote>
  
  <p>So what I did wrong with </p>
  
  <blockquote>
    <p>printf %s</p>
  </blockquote>
  
  <p>?</p>
  
  <p>Thanks in advance.</p>