title: How do I read and compare single bytes from .jpeg file in C++?
body: <p>I need to read single bytes from a jpeg file. In other words, i have this hex dump from a jpg file: <a href="https://i.stack.imgur.com/8R64Z.png" rel="nofollow noreferrer">The Yellow circled part is the one i need to read</a> and I need to write a simple C++ code that could read all the bytes until it gets to the interesting part. How can I, once I read one byte, compare it with a value I give to it?</p>
  
  <p>I need this because after 5 bytes from that "FF" byte, it says my jpeg's dimensions in pixels and i need to retrieve them.</p>
  
  <p>I'm sorry if I made some language mistakes but I'm not mother tongue.</p>