title: C: convert argv[1] to double
body: <p>I need to pass a double to my program, but the following does not work:</p>
  
  <pre><code>int main(int argc, char *argv[]) {
  
  double ddd;
  
  ddd=atof(argv[1]);
  
  printf("%f\n", ddd);
  
  return 0;
  }
  </code></pre>
  
  <p>If I run my program as <code>./myprog 3.14</code> it still prints <code>0.000000</code>.</p>
  
  <p>Can somebody please help?</p>