I have an array uint8_t arr[512] and I need to store a string, IP address and a 32digit number in this array. So I thought of defining another array of strings as below.
uint8_t *ch[] = {
"abcd",
"1.1.1.1",
"123456782341223344445"
};
Then do a memcpy into the arr[512]. Is this OK? I think I may not be able to retrieve the IP address from the arr. Any other ideas please. Thanks for your time.
char* str[]and charstr[][]and how both stores in memory? to know how*ch[]stored in memory, memcopy needsourcein continues memory whereas its not.uint8_t*instead ofchar*?structthat contains a string, a 32Bit-Integer for the IP-adress and a second string for the 32-digit number?structinstead ofarr[512]orch[]? can you please elaborate.