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

pointer to array is killing me!!!

I'm having serious problem with the following code:

unsigned char code * Progtxtstring_ENG[] =
{
  "PROGRAM",
  "SYSTEM"
};
unsigned char code * pMenu;
//User selected English
pMenu = Progtxtstring_ENG;

//Why doesn't this work, it just get garbage out:
printf("%s",pMenu[0]);
// This line below works
printf("%s",Progtxtstring_SWE[0])
I'm converting my program to handle selection of multiple languages. I want to select what language to print by a integer.
But here I'm trying to point to the correct "pointerarray" that contains the language. (Progtxtstring_XXX for language XXX) But I can't get it right. I'm guessing I am messing with the data types. It's an Philips 80C552 with the latest compiler. Would really appritiate some help.

0