title: in MPI in c how to create a struct of structs and send it to multiple process
body: <p>so I have this struct</p>
  
  <pre><code>typedef struct{
       float x;
       float y;
       int centroid;
  }point;
  </code></pre>
  
  <p>And I also have this struct </p>
  
  <pre><code>typedef struct{
       int csize;//the current size
       int tsize;//the total size
       point * data;//the data carried
  }ArrayList;
  </code></pre>
  
  <p>These second struct forms a dynamically growing array in C (Functions for dynamic growth is implemented and working fine).
  how exactly do I create a struct of that and send it using MPI in c?
  I looked at other posts like <a href="https://stackoverflow.com/questions/9864510/struct-serialization-in-c-and-transfer-over-mpi">struct serialization in C and transfer over MPI</a> and others but I could't find a solution to my problem.</p>
  
  <p>I'd appreciate some help.</p>
  
  <p>Best,
  Gedo</p>
  
  <p>EDIT- the possible duplicate does NOT solve my question, my question is pertaining a struct containing a pointer to an array of structs which is dynamically growing. the duplicate question pertains having an array of native types in a struct.</p>