This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

array of pointers

Want to translate the following code (C51) to ARM

const char code *txt_unidade_forca[] = { "gf ", "kgf", "N ", "lbf", NULL};

In this case both texts and pointers are placed in CODE. How to do this in ARM ?

Parents
  • const char *const txt_unidade_forca[] = { "gf ", "kgf", "N ", "lbf", NULL};
    

    As a general rule, the const to the left of the asterisk refers to the strings, the one to the right refers to the array of pointers.

    Regards,
    - mike

Reply
  • const char *const txt_unidade_forca[] = { "gf ", "kgf", "N ", "lbf", NULL};
    

    As a general rule, the const to the left of the asterisk refers to the strings, the one to the right refers to the array of pointers.

    Regards,
    - mike

Children