Making an array element a reference to another variable
hello. have array of strings. need 1 of elements equal variable outside of array. i've tried pointers, have had no luck. in advance.
code: [select]
prog_char str1[] progmem = "string 1";
prog_char str2[] progmem = ".string2";
progmem const char *strs[] =
{str1,str2};
// extract use
strcpy_p(buffer, (char*)pgm_read_word(&(strs[i])));
is kind of thing after?
happy coding
Arduino Forum > Using Arduino > Programming Questions > Making an array element a reference to another variable
arduino
Comments
Post a Comment