topicArray
defined as follows:
const char* msgTopic = "Home/Messages";
const char* groupTopic = "Home/All";
char* deviceName = deviceTopic;
const char* topicArry[2] = {deviceTopic, groupTopic};
But deviceTopic
can be changed during code run, and I wish that topicArray
containg deviceTopic
will have the correct value after deviceTopic
has changed.
What is the right way doing so ?
const
and you can change the values (pointers) it containsconst
ouf of array and all other variable, but still array is not changedconst
"topicArray[0] = "something"