title: Why does my sizeof(arr) / sizeof(arr[0]) = 1?
body: <pre><code>typedef struct {
    double *x;
    int points;
  } Polygon;
  
  
  
  polygon[cc].points = readobject(polygon[cc].file); //lets say equals 15
  polygon[cc].x = (double *) malloc(polygon[cc].points * sizeof(double));
  
  printf("%d\n", sizeof(polygon[cc].x) / sizeof(polygon[cc].x[0]));
  //This prints out on 1
  </code></pre>
  
  <p>I've test initializing <code>x</code> as <code>x[100]</code> and it works then, but shouldn't the <code>malloc()</code> call set the struct's array at <code>x[15]</code>? Is it just measuring the bytes of two <code>double</code>s?</p>