Hi,
I am having some problems using an array of strings. See the code below:
String command[2];
command[0] = "egfweg";
command[1] = "egweg";
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
And then, it gives this error:
'command' does not name a type
Yeah, I could initialize the array of strings at the same time when declaring it, like below:
String command[2] = {"egfweg", "egweg"};
But I don't want to do that. I want to initialize the array of strings later.
If I can initialize an array later, then why not an array of strings?
Can anybody help me to fix this problem?
Thanks!