Nested arrays in structs

 
These seem to compile easily in meta editor however the arrays at the nodes do not store values. 

Has any one some experience in using these?

 
ssn:
These seem to compile easily in meta editor however the arrays at the nodes do not store values. 

Has any one some experience in using these?

How about some codes to assist the people trying to help you.
 
Ubzen:
How about some codes to assist the people trying to help you.
Sorry for the bother. I got this to work.
 
ssn:
Sorry for the bother. I got this to work.
As it seems, you don't worry to share your experience. Next time you ask help, we will have to think about that.
 
angevoyageur:
As it seems, you don't worry to share your experience. Next time you ask help, we will have to think about that.
You want to see the code?
 
ssn:
You want to see the code?
It's up to you to see if your problem and the solution can be of any interest for the community. Nothing personal.
 
angevoyageur:
It's up to you to see if your problem and the solution can be of any interest for the community. Nothing personal.

the community… ok.

 

Here is a sample that may be of interest. I think it puts across the idea.  

int                     _NODES;
struct SNode
  {
      double            test;
  };
int                     _NESTS;
struct SNest
  {
      SNode             node[];
  };
SNest                   _nests[];

//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
      _NESTS=7;_NODES=5;
      ArrayResize(_nests,_NESTS);
      for(int i=0;i<_NESTS;i++){
         ArrayResize(_nests[i].node,_NODES); // THIS WAS MY OMISSION.
         for(int j=0;j<_NODES;j++){
            _nests[i].node[j].test=MathRand()%7; }}
         
      for(int i=0;i<_NESTS;i++){
         for(int j=0;j<_NODES;j++){
            Print(" in nest ",i," at node: ",j,", is value ",_nests[i].node[j].test); }}
  }
 
ssn:

the community… ok.

 

Here is a sample that may be of interest. I think it puts across the idea.  

Thank you.
Reason: