How can I use const char* inside another char?
This is my demo code:
void setup() {
Serial.begin(115200);
}
void loop() {
const char* myName = "John";
char fullName[] = "My name is: ", myName;
}
Error message:
Arduino: 1.8.10 (Mac OS X), Board: "LOLIN(WEMOS) D1 mini Lite, 80 MHz, Flash, Legacy (new can return nullptr), All SSL ciphers (most compatible), 1MB (FS:64KB OTA:~470KB), v2 Lower Memory, Disabled, None, Only Sketch, 921600"
conflicting declaration 'char myName'
char fullName[] = "My name is: ", myName;
^
charTestSLETDENHER:9:15: error: 'myName' has a previous declaration as 'const char* myName'
const char* myName = "John";
^
exit status 1
conflicting declaration 'char myName'
This is just demo code, but I need to know how to do this, to use in another project, so it must be an char.