Hi there,
Say I have a payload:
1) unsigned char apayload[] = {'H','i',' ','T','h','e','r','e'};
And then I have another payload, which is the same as above but with an additional 2 characters:
2) unsigned char received_payload[]={'H','i',' ','T','h','e','r','e,'a','b''};
How would I go about making the second payload exactly the same as the first payload?
I basically want to null out array blocks [8] and [9] of the second payload so that the characters 'a' and 'b' are ignored basically no longer exist so it becomes a payload of size [8] like the first one.
I am trying this at the moment but it does not work as I guess it is just adding "0" as a character to the array and not terminating that block all together.
for (int i=8;i <10; i++)
received_payload = 0;
Thankyou!!