I have a Byte array :
BYTE Buffer[20000]; this array contains the following data:
00FFFFFFFFFFFF0010AC4C4053433442341401030A2F1E78EEEE95A3544C99260F5054A54B00714F8180B3000101010101010101010121399030621A274068B03600DA281100001C000000FF003457314D44304353423443530A000000FC0044454C4C2050323231300A2020000000FD00384B1E5310000A20202020202000FA
My question is how can I search this array for a pattern like "000000FC"? I don’t really think it is important, but I need the index where I can find my pattern too.
Since you’re in C++, do it the C++ way:
You can also use an algorithm to search the array directly:
Or, in C++17, you can use a string view: