mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-05-12 03:28:29 +08:00
fix : fixed array errors
This commit is contained in:
@@ -75,9 +75,15 @@ std::complex<double>* FastFourierTransform(std::complex<double>*p,uint64_t n)
|
||||
static void test() {
|
||||
/* descriptions of the following test */
|
||||
|
||||
std::complex<double> t1[2]={1,2};///Test case 1
|
||||
std::complex<double> *t1= new std::complex<double>[2];///Test case 1
|
||||
t1[0]={1,0};
|
||||
t1[1]={2,0};
|
||||
|
||||
std::complex<double> t2[4]={1,2,3,4};///Test case 2
|
||||
std::complex<double> *t2=new std::complex<double>[4];///Test case 2
|
||||
t2[0]={1,0};
|
||||
t2[1]={2,0};
|
||||
t2[2]={3,0};
|
||||
t2[3]={4,0};
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user