Need help with valarray. Here is my code:
#include <valarray>
#include <complex>
typedef std::complex<double> Complex;
typedef std::valarray<Complex> CArray;
//some code
CArray *abc = new CArray(10);
Complex mem = abc[5]; //Error here
It complaints that there are no suitable conversion from CArray to Complex. Why it tries to return something of CArray type?! Thanks in advance
P.S.
'std::valarray<Complex>::operator[]' non-standart syntax; use'&' to create a pointer to member