Constructor for a telescoping structure

  • Thread starter Thread starter MyCatAlex
  • Start date Start date
M

MyCatAlex

Guest
I am trying to make this structure work

struct OutMemStream2 {
struct a1 {
uint8_t n1; // pixel coordinate
float x1; // pixel amplitude multiplied by Re of function
float y1; // pixel amplitude multiplied by Im of function
};
struct a2 {
uint8_t n1; // pixel coordinate
float x1;
float y1;
};
struct a3 {
uint8_t n1; // pixel coordinate
float x1;
float y1;
...........................................
};
OutMemStream2(struct a1(uint8_t n1, float x1, float y1),
struct a2(uint8_t n1, float x1, float y1),
struct a3(uint8_t n1, float x1, float y1));
};
OutMemStream2* ptr;
int gg = sizeof(OutMemStream2);
struct bb1 = new OutMemStream2(); // <== errors

It is a fragment but in reality each primary structure must have 88 substructures. Some other elements of different type might be subsequently added to the substructures too. I need eventually 860 such primary structures. I've tried to write a constructor to be able to multiply them but it doers not work. Any help?

Thank you, - MyCatAlex

Continue reading...
 
Back
Top