Suppose I have a struct with a type that possesses a constructor:
struct my_struct {
array2D<double> arr;
array2D<double> arr2; etc.
}
// where I would typically generate arr like:
int n = 50; int m = 100;
array2D<double> arr(n,m);
Right now, I initialize my struct as follows:
struct my_struct {
array2D<double> arr;
my_struct(n,m){
array2D<double> this_arr(n,m);
this->arr = this_arr;
}
}
Is there a way to access the constructor like so (in pseudo code):
struct my_struct{
array2D<double> arr;
my_struct(n,m){
this->arr(n,m);
}
}
Right now, I am holding pointers in my struct...but then using the struct is beside the point, because I am trying to use the struct to clean up the code.