任何人都可以帮助我解决我看不到的代码问题。我有一个要显示的字符串数组。一个变量,它增加和减少并希望将字符串传递给函数。问题是我想要的整个字符串没有被传递
即 ucMainMenu = 1 MenuString[1] = "TIME" DisplayString("TIME")
const char MenuString[6][8] = {"UNITS", "TIME", "DATE", "PRINT", "BTOOTH", "SERVICE"};
void main
{
ucMainMenu++; //variable changing
DisplayString(MenuString[ucMainMenu]); //look up variable in array pass string to function
}
void DisplayString(char *cDisplayString)
{
//do stuff with string
}