S
Sebastian Thiebes
Hello all,
I am using valarrays of double in my code, but for using certain
functions I need to pass a normal array of double. What I did was
write something like this:
valarray<double> vad;
// somehow fill this valarray
double* da = new double[vad.size()];
for (long i = 0; i < vad.size(); ++i)
{
da = vad;
}
This works fine. However I feel this not to be an elegant solution to
the proplem, is there a way to maybe directly cast a valarray into a
normal array, or is there another way to do this conversion more
efficiently?
Thanks in advance,
Sebastian
I am using valarrays of double in my code, but for using certain
functions I need to pass a normal array of double. What I did was
write something like this:
valarray<double> vad;
// somehow fill this valarray
double* da = new double[vad.size()];
for (long i = 0; i < vad.size(); ++i)
{
da = vad;
}
This works fine. However I feel this not to be an elegant solution to
the proplem, is there a way to maybe directly cast a valarray into a
normal array, or is there another way to do this conversion more
efficiently?
Thanks in advance,
Sebastian