Why myarray[0]==0 after myarray[0]=123?
int init()
{
//----
//Try to initialise array like this:
int myarray[1]; //Array size 1
// or
int myarray[];
ArrayResize(myarray, 1);
// That should work
int test;
myarray[0]=123;
Print (myarray[0]); //---------------- result: 0
test=456;
Print (test); //---------------- result: 456
//----
return(0);
}
int init()
{
//----
//Try to initialise array like this:
int myarray[1]; //Array size 1
// or
int myarray[];
ArrayResize(myarray, 1);
// That should work
int test;
myarray[0]=123;
Print (myarray[0]); //---------------- result: 0
test=456;
Print (test); //---------------- result: 456
//----
return(0);
}
Why myarray[0]==0 after myarray[0]=123?
int init()
{
//----
//Try to initialise array like this:
int myarray[1]; //Array size 1
// or
int myarray[];
ArrayResize(myarray, 1);
// That should work
int test;
myarray[0]=123;
Print (myarray[0]); //---------------- result: 0
test=456;
Print (test); //---------------- result: 456
//----
return(0);
}
int init()
{
//----
//Try to initialise array like this:
int myarray[1]; //Array size 1
// or
int myarray[];
ArrayResize(myarray, 1);
// That should work
int test;
myarray[0]=123;
Print (myarray[0]); //---------------- result: 0
test=456;
Print (test); //---------------- result: 456
//----
return(0);
}
Thanks.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
int init()
{
//----
int myarray[];
int test;
myarray[0]=123;
Print (myarray[0]); //---------------- result: 0
test=456;
Print (test); //---------------- result: 456
//----
return(0);
}