Variatic functions and Structures
1. Can I somehow determine the size of the array (s) without having them passed as a parameter?
2. How do I reference the array of structs to assign it to array3[][]?
The code below attampts to explain what I am trying to do... I know it contains errors but i think you can get the jist of what I am trying, rather unsucsesfully, to do:
struct x{double a, double b};
main{
x array1[AnyAmount < MAX];
x array2[AnyAmount< MAX];
myclass obj(3,array1,array2);
}
myclass class{
public:
int q;
x array3[CONST][CONST];
myclass(int,...);
};
myclass::myclass(int num, ...){
va_list list;
va_start(list,num);
x *array_of_struct;
q = num;
for(int x = 0; x <= q; x++){
array_of_struct = &va_arg(list,x);
int indecee_count = sizeof(&array_of_struct )/sizeof(Dwell_Struc);
for(int y = 0; y < indecee_count ; y++){
array3[x][y] = array_of_struc[y];
}
}
va_end(list);
}
Thanks for helping the Hardware guy do Software!

