const char* variable for function

Hallo,

I have a problem with calling a function I want to implement into my program. The function has the following format:

function(const char* ssid, const char* passphrase)

I have my ssid saved in the EEPROM (0-8) and the passphrase in the EEPROM (9-16). Is there any way to get the data out of the EEPROM in the correct format for calling the function successfully?

I am stuck here and would highly appreciate any advice.

Thank you very much in advance

There are methods to read EEPROM data.
Store this data into an array.

That is not my problem. I know how to get data out of the EEPROM into an array but I have no idea how to get it into the format the function requests as I have never really worked with pointers

Example

char test[10];

char *p;

p = test;

thank you very much, that helped a lot and did the trick.

I just checked again, as soon as I try to add new values out of the EEPROM to the const char it doesn't work because it is read only. So although the pointers work in general, I see no way to get my EEPROM values into the const char variable. :frowning:

Read the EEPROM data, put this data into the array which is in SRAM.
The data in the SRAM array is in read write memory.

But then I will not be able to make this data a const char which it needs to be in the end

I will not be able to make this data a const char

Why?

I forgot to add the \0 at the end, that solved it finally. Thank you very much for your help!