Brkic
1
Hi everybady,
i have problem with some code
char ONE[1];
char MENU[][maxItemSize] ={"Date","Time","Alarm","Format","Zone","Daylight","BACK"};
.
..
...
strcpy(ONE,"Proba");
I want change MENU[1] with ONE //MENU[1]=Time and i want MENU[1]=Proba
///
when ONE is string i will use ONE.toCharArray(MENU[2], ONE.length()+1); and everything is work but with ONE=char i dont know.
Somebody can help me, thanks.
char ONE[1];
How many characters can this array hold ?
strcpy(ONE,"Proba");
How many characters are you copying to it ?
Brkic
3
ONE have One character
strcpy(ONE,"P"); // this is only example "P" or "Proba"
Brkic
5
OK, I will change that
char ONE[2];
char MENU[][maxItemSize] ={"Date","Time","Alarm","Format","Zone","Daylight","BACK"};
.
..
...
strcpy(ONE,"P");
I want change MENU[1] with ONE //MENU[1]=Time and i want MENU[1]=P
Brkic
7
This is a code when ONE is string
char MENU[][maxItemSize] ={"Date","Time","Alarm","Format","Zone","Daylight","BACK"};
String ONE;
void niz()
{
ONE="Proba";
ONE.toCharArray(menu[1], amp.length()+1);
}
and that code is work OK,
now ONE is char,how to replace value in a MENU
char ONE[6];