I am having a brainfart atm. I have a character array defined as buffer[1024]. When my code is executed, it get filled up with various data. I know that starting at buffer[2] is an unsigned short. This obviously stretches from buffer[2] to buffer[3]. I am trying to assign it to a variable, but am stumped because I am not getting the right out put.
Would this not be the way to do it?
or something similar? I have been working on this project too long.Code:var = (unsigned short)buffer[2];