【发布时间】:2011-05-24 14:13:21
【问题描述】:
我有一个类,像这样在 .h 中定义
#ifndef JLLABOUR_H
#define JLLABOUR_H
class JLLabour{
public:
JLLabour(int, int);
double* recursivefft(double*,int);
void FFT(int*);
~JLLabour();
private:
int width;
int height;
};
#endif // JLLABOUR_H
在我的 .cpp 中,我定义了递归函数,问题是当我再次调用它时,在编译期间它不允许我继续,因为尚未定义该方法。我不知道如何解决这个问题,请帮助。
#include <JLLabour.h>
double* JLLabour::recursivefft(double* x,int asize){
//operations and declartions...
//...
even = recursiveFFT(sum,m); //<-- the problem is here, in the recursion.
odd = recursiveFFT(diff,m);
// more operations....
return result;
}
}
仅供参考,我正在 Linux 下编译,使用 Qt,因为我正在开发图形应用程序...
【问题讨论】:
-
sum、diff、even、odd、m的类型有哪些? -
您认为的问题可能不是。请发布您遇到的错误。
标签: c++ class methods recursion