I am doing a project that uses a library with source code I want to leave unaltered. Inside one of the library's source code files is a global const c-style string array that I want to alter externally from another file in the project:
const u8 STRING_PRODUCT[] PROGMEM = USB_PRODUCT;
By default global constants have internal linkage. Is there anyway to possible change this array without touching the code in this file? Or can I at least somehow get the memory address of this array and then use a pointer to alter it? Thank you!
No need to modify the source code. USB_PRODUCT is defined in USBCore.cpp only if it's not already defined, so just define it as whatever you want when compiling the library. (Reference)