I am receiving over ethernet into a 'char messageBuffer[512]' and then passing it on by a function call to 'process((char*) messageBuffer)' then in process:
void process(char* theMessage)
{
myStruct messageBuffer;
memcpy(&myStruct, &theMessage, sizeof(theMessage)); //this line is wrong
}
Im not sure how to properly put it back into myStuct once it is received. myStruct is how the data was sent and now I want to put it back in and see it correctly.
Any input would be appreciated. Thanks.
P.S. Why arent the code tags working?