title: comparison between unsigned int and unsigned char
body: <p>I have an unsigned char array, such as <code>Data[2]</code>. I needed it to compare with an output of a function returning unsigned int.</p>
  
  <p>i tried to cast the <code>Data[2]</code> into unsigned int and vice versa. It didn't work.</p>
  
  <p>What I am trying to do is:</p>
  
  <pre><code>if (Data[2] == ReadFlash2(40))
  {
      //Do Something.
  }
  </code></pre>
  
  <p><code>ReadFlash2</code> is a function returning unsigned int, while <code>Data[2]</code> is a unsigned char.</p>
  
  <p>I tried to cast each of them, but it didn't work.</p>
  
  <p>Is there something I am doing wrong?  Which one should I cast, and to what should I cast it?</p>
  
  <p>Thanks.</p>
  
  <p>Edit:
  the code for the Readflash function:</p>
  
  <pre><code>unsigned int ReadFlash2(unsigned int Addr) // use as Read Function 
  {
  pMem = (unsigned int*)MEM_STR_ADR; 
  pMem += Addr; 
  Nop(); 
  return(*pMem); 
  }
  </code></pre>