title: Why do we need to specify type in format specifiers in the C++ printf function?
body: <p>I've done a bit of PHP and when you declare variables you do not need to declare the type (eg. string or int).</p>
  
  <p>However I have to tweak a very simple C file and, in order to get the print function to work correctly, I have to include a type specifier for the output of each variable.</p>
  
  <p>Why isn't this type automatically inferred from the variable itself?</p>