mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-05-11 19:17:21 +08:00
fix : using delete[ ] instead of delete
This commit is contained in:
@@ -61,8 +61,8 @@ std::complex<double>* FastFourierTransform(std::complex<double>*p,uint64_t n)
|
|||||||
y[i]=ye[i]+pow(om,i)*yo[i]; ///Updating the first n/2 elements
|
y[i]=ye[i]+pow(om,i)*yo[i]; ///Updating the first n/2 elements
|
||||||
y[i+n/2]=ye[i]-pow(om,i)*yo[i];///Updating the last n/2 elements
|
y[i+n/2]=ye[i]-pow(om,i)*yo[i];///Updating the last n/2 elements
|
||||||
}
|
}
|
||||||
delete ye;
|
delete[] ye;
|
||||||
delete yo;
|
delete[] yo;
|
||||||
return y;///Returns the list
|
return y;///Returns the list
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -113,8 +113,8 @@ static void test() {
|
|||||||
o2++;
|
o2++;
|
||||||
}
|
}
|
||||||
|
|
||||||
delete o1;
|
delete[] o1;
|
||||||
delete o2;
|
delete[] o2;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user