Specifically, I'm wondering if this line:
memset(cjzyp,(0,0),size_cjzy*sizeof(std::complex<float>));
will fill cjzyp
, an array of complex<float>
s, with the complex zero value ((0,0)
).
std::memset
takes as second parameter an int converted to an unsigned char, it won't work. Use std::fill
instead
http://www.cplusplus.com/reference/algorithm/fill/
cjzyp = new std::complex<float>[100]
std::fill(cjzyp, cjzyp + 100, std::complex<float>(-1.0, 0.0));
delete [] cjzyp;