title: c++ non-POD warning for passing a string?
body: <pre><code>void displayinfo(string &amp;filename)
  {
  printf("%s% 38s\n", "Filename:", filename);
  ...
  </code></pre>
  
  <p>Warning: A non-POD object of type "std::string " passed as a variable argument to function "std::printf(const char*, ...)".</p>
  
  <p>There is nothing online explaining what that warning means.</p>
  
  <p>How would I get the printf to write this (assuming filename = test.txt):</p>
  
  <p>Filename: (right justify filename) test.txt</p>
  
  <p>Thanks in advance.</p>