title: Converting char to int [C]
body: <p>I have a char byte that I want to convert to an int. Basically I am getting the value (which is 0x13) from a file using the fopen command and storing it into a char buffer called buff.</p>
  
  <p>I am doing the following:</p>
  
  <pre><code>//assume buff[17] = 0x13
  
  v-&gt;infoFrameSize = (int)buff[17] * ( 128^0 );
  </code></pre>
  
  <p>infoFrameSize is a type int that is stored in a structure called 'v'.</p>
  
  <p>The value I get for v->infoFrameSize is 0x00000980. Should this be 0x00000013?</p>
  
  <p>I tried taking out the <strong>multiply by 128 ^ 0</strong> and I get the correct output:</p>
  
  <pre><code>v-&gt;infoFrameSize = 0x00000013
  </code></pre>
  
  <p>Any info or suggested reading material on what is happening here would be great. Thanks!</p>