I want to move through a hexdump one byte at a time, using a pointer, until I find a specific sequence of bytes that is X bytes long. To do this, I need to cast a pointer to a size of X bytes. For example, a pointer for a size of 3 bytes. I know that I could simply use something like uint16_t if I wanted it to be 2 bytes, or uint32_t if I wanted it to be 4 bytes. But neither of these work for this.
I have to start by pointing to the start of the block of memory that I have the location of, so that I can move through it one byte at a time. How can I do this without losing that position?