for (int i=0; i<100; i++) for (int j=0; j< 10; j++) myarray[i,j]='x';
Thanks WHR thats what I thought I might have to do.
It seems that myarray[100,10]={"X"} initializes the first element with X and the rest of the whole array with "" which then causes ObjectSetText("label"+i, myarray[x,y],0,0,0); to default to the string "label" as the screen output.
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
Is there a way to initialize a whole string array to x without doing
I dont really want to have a huge line of code so i tried myarray[100,10]={"x"}; but then it only initializes the first element and the built in function arrayintialize() only seems to work with numeric arrays is my only option to have a loop to write x into every element ?
My reason for this is because i want to objectsettext() to label objects from the array and I have a problem with the objects displaying the word label before their corresponding array elements are initialized with a printable character