| |||||
Technical Support Support Resources
Product Information | C166: LOCATING ARRAYS OF STRINGS IN ROMInformation in this article applies to:
QUESTIONHow do I locate arrays of pointers in ROM? I have written the following declaration with the strings stored in ROM as consts; however, the array itself is stored in RAM. How do I store the array in ROM as well?
const char *array[] = {"String 1","String 2", "etc..."};
ANSWERYou must declare the array as const. The following line will do the trick:
const char *const array[] = {"String 1","String 2", "etc..."};
MORE INFORMATION
SEE ALSOLast Reviewed: Friday, July 15, 2005 | ||||
| |||||