title: Reading data from .raw file
body: <p>I have RAW file in grayscale with 8-bit data and I'm trying to read the data using simple program:</p>
  
  <pre><code>#include &lt;fstream&gt;
  #include &lt;iostream&gt;
  using namespace std;
  
  int main(){
      char fileName[80] = "TEST.raw";
      //char buffer[255];
      ifstream fin(fileName);
      char ch;
      int i = 0;
      while (fin.get(ch)){
          cout &lt;&lt; (unsigned int)ch &lt;&lt; " ";
          i++;
      }
      cout &lt;&lt; endl;
      cout &lt;&lt; "i = " &lt;&lt; i;
      fin.close();
      cin &gt;&gt; ch;
  }
  </code></pre>
  
  <p>Some of values are higher than some specific value and I'm getting strange output. When i should get something like this:</p>
  
  <pre><code>(...) 34    34    34    36    43    59    88    123    151    166 (...)
  </code></pre>
  
  <p>i have:</p>
  
  <pre><code>(...) 34 34 34 36 43 59 88 123 4294967191 4294967206 (...)
  </code></pre>
  
  <p>I guess it's simple problem, but I have no idea how to do it correctly.</p>