Interesting issue. From reading your error message it seems your compiler is not sure what version of the * operator to work with?
This is not throwing an error on g++, so I can't test it. From what I'm reading you need to give the compiler a little help to determine what to do.
I'm not sure if this would resolve it or not, but try wrapping the complex variables in parenthesis... term1[n] = (y1[n]) + (W_N[n]) * (y2[n]);
Other way to solve it is to cast it...? term1[n] = ((complex<double>) y1[n]) + ((complex<double>) W_N[n]) * ((complex <double>) y2[n]);
Sorry, I hope one of those helped. Anyone here using Visual Studios who might be able to help?
The compiler was not sure which one should be given a stronger weight in this situation, so it stalled out rather than trying to guess. This is safe behavior in general since you wouldn't want it guessing wrong and resulting in undefined behavior in a finished software product.
@newbieg I understand that. I am confused since each vector element is explicitly a complex<double>, for both operand vectors. So, the first candidate should be picked. It should not be ambiguous- is what I think.
And you would think your problem would be more widespread on the internet since I'd assume a lot of people who work with complex would be using doubles and would use the * operator too, but I could not find any post with this specific issue.
Mind if I ask what version of G++ you're on? Mine is Ubuntu 10.3.0 I'm still trying to get mine to throw the same error and it's not causing one.
@lastchance, I'm sorry for not adding the includes and main. Showing the whole code is difficult as its a fairly large DLL. The FFT function should be standalone. The error is from current version where I have yet to complete CZT function.
And weirdly, after writing two more lines for CZT function (same file) the error is just gone. Now it compiles properly.
Note: I have added two more process lines for CZT function but no return statement.