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  8) 8)


Arduino Forum > Using Arduino > Programming Questions > Making an array element a reference to another variable


arduino

Comments

Popular posts from this blog

opencv3, tbb and rasp pi 2 - Raspberry Pi Forums

small ethernet problem - Raspberry Pi Forums

Multithumb configuration params not working? - Joomla! Forum - community, help and support