我正在尝试以下代码:
void OnInit()
{
int i = 0;
string d[];
while(i < 2)
{
ArraySetAsSeries(d,true);
for (int j=0; j<5; j++)
{
if(MathMod(j,2)==0 && i==0)
d[j] = "even";
else if(MathMod(j,2)==0 )
d[j] = "even without i zero";
else
d[j] = "odd";
}
i++;
}
}
我愿意在测试中获得输出。但我收到以下错误:
2018.03.23 14:51:20.005 EURUSD,M1 (MetaQuotes-Demo): generate based on real
ticks
2018.03.23 14:51:20.006 EURUSD,M1: testing of Experts\testing lines and trdae.ex5 from 2018.02.01 00:00 to 2018.02.20 00:00 started
2018.03.23 14:51:20.050 2018.02.01 00:00:00 array out of range in 'testing lines and trdae.mq5' (61,2)
2018.03.23 14:51:20.051 OnInit critical error
请帮我摆脱这个并打印我愿意打印的数组。