Valmian 0 Junior Poster in Training

ok.. here I am with a double pointer to a 2D array and I am copying the data from another struct in to this 2d struct array.
It gives me an illegal opperand error.
Code:

data.rows=polar.rows;
 data.trace = (SQwPOL**)calloc(polar.width,sizeof (SQwPOL*));
 for (int i=0; i<polar.width; i++)
 {
  data.trace[i]= (SQwPOL*)calloc(polar.width,sizeof (SQwPOL));
  for (int a=0; a<data.rows; a++)
  { 

   data.trace[i][a]=polar.ar[i].values[a]; //says it is an illeal opperand here
   printf ("\nThe number copy #%d = %d, original #%d = %d",i,data.trace[i][a],i,polar.ar[i].values[a]);
  }
 }
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.