Home > Back-end >  C3867, c2679
C3867, c2679

Time:09-27

Intention is to want to randomly generated a set of complex number, and then used in Fourier transform, but at the time of print these plural encountered some problems, according to the plural form of Output, the results in the Output [I] real error here, how change, bosses told
 
Complex * SetInput (double size)
{
Srand ((double) time (0));
Complex * the Output=new complex [size];

For (int I=0; i {
The Output [I]=complex (rand (), the rand ());
}
Return the Output;
}

Void Print (complex * the Output, double length)
{
For (int I=0; i {
If (the Output [I] imag> 0)
Cout & lt; The else
cout}

CodePudding user response:

Cout & lt; () & lt; <"+" & lt; () & lt; <"J" & lt; Pay attention to the scarlet letter, that is the function, not fields,,,,

CodePudding user response:

Into a method call
The
If (the Output [I]. Imag () & gt; 0)
Cout & lt; ()
Etc.

CodePudding user response:

But forgot the
  • Related