title: typedef char array as function parameter
body: <p>C newbie here.
  I wrote:</p>
  
  <pre><code>typedef unsigned char HBLOCK[SHA512_DIGEST_LENGTH];
  typedef unsigned char HPRINTABLE[sizeof(HBLOCK)*2];
  typedef struct {
                  HBLOCK Primary;
                  HBLOCK *Part;
                 } FILE_HASH_MAP;
  void blockhex(const HBLOCK *, HPRINTABLE *);
  </code></pre>
  
  <p>intending to write the function to convert HBLOCK to hex string. However when I tried to test if individual characters are assignable</p>
  
  <pre><code>void blockhex(const HBLOCK *block, HPRINTABLE *printable)
  {
   printable[0]="6";
  };
  </code></pre>
  
  <p>The compiler said </p>
  
  <pre><code>error: incompatible types when assigning to type ‘HPRINTABLE’ from type ‘char *’.
  </code></pre>
  
  <p>This puzzles me as I hoped the HPRINTABLE typedef would clearly indicate it to be an array type.
  Moreover, when I call it like this</p>
  
  <pre><code>FILE_HASH_MAP fhm;
  HPRINTABLE prt;
  blockhex(fhm.Primary,&amp;prt);
  </code></pre>
  
  <p>The compiler also says </p>
  
  <pre><code>warning: passing argument 1 of ‘blockhex’ from incompatible pointer type
  </code></pre>
  
  <p>and </p>
  
  <pre><code>note: expected ‘const unsigned char (*)[64]’ but argument is of type ‘unsigned char *’
  </code></pre>
  
  <p>those are not errors, of course, but I'd like to know what I did wrong anyway.</p>