title: C passing argument 1 of ‘fread’ makes pointer from integer without a cast
body: <p>I'm sorry to bother you with this, but i'm stuck with it for too long already.
  I get the following warning on fread: "warning: passing argument 1 of ‘fread’ makes pointer from integer without a cast"<br>
  I'm new to C and really like it, but don't get over this.<br>
  Thanks in advance.</p>
  
  <pre><code>    typedef unsigned char byte;
  
      int main( int argc, char *argv[]){
          FILE * filein;
          filein = fopen(argv[1], "r" );
          int width=10;
          int height=10;
          byte ** data;
  
          // Allocation
          data = (byte **) malloc(height*sizeof(byte *));
          for(int i=0;i&lt;height;i++){
              data[i]=(byte *) malloc(width*sizeof(byte));
          }
  
          for(int i=0;i&lt;height;i++){
              for(int j=0;j&lt;width;j++){
                  fread(data[i][j], sizeof(const char), 1, infile);
              }
          }
  
          for(int i=0;i&lt;height;i++){
              free(data[i]);
          }
          free(data);
          fclose(filein);
  
          return 0;
          exit(0);
      }
  </code></pre>
  
  <p>This is only a small piece of the actual program. The task is to read a binary pgm-image, store it in a data-matrix, normalize the values and write them to a new binary pgm-image.</p>