I have the following structure:
struct localframepos
{
double ipos; //local room frame i(x) coordinate, in mm
double cpos; //local room frame c(y) coordinate, in mm
double rpos; //local room frame r(z) coordinate, in mm
localframepos()
{
ipos = 0;
cpos = 0;
rpos = 0;
}
localframepos(double init_ipos, double init_cpos, double init_rpos) //init constructor
{
ipos = init_ipos;
cpos = init_cpos;
rpos = init_rpos;
}
};
How do I get the following functionality:
localframepos positions[] = { {0, .5, .2},
{4.5, 4, .5} };
Remove the constructors. To use curly brace initialization, the type has to be a POD.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With