Dear Sir, I use a structure like this one: typedef struct st { char t; struct st*;} I would like to store several structures in ROM. I wrote the following code const struct st1 = { 1, &st2}; const struct st2 = { 2, &st1); The compilation produce an undefined identifier error 202 (c51 V4.02). What can I do to solve this problem? Best regards
OK, this code must work (note the extern keyword):
struct st { char t; struct st *ptr;}; extern const struct st st2; const struct st st1 = { 1, &st2}; const struct st st2 = { 2, &st1};