fiona012 2014-05-06 14:49
浏览 759

我的一段C语言程序在VC6.0上面运行不出来,貌似是头文件的问题,求帮忙

#include"C:\Users\hp\Desktop\complex.h"
main()
{
complex *a;
int N=1024;
//给a赋值
fft(a,N)

}
int fft(complex *a,int l)
{
const double pai=3.141592653589793;
complex u,w,t;
unsigned n=1,nv2,nm1,k,le,lei,ip;
unsigned i,j,m;
double tmp;

x<<=1;
nv2=n>>1;
nm1=n-1;
i=0;
for(i=0;i<nm1;i++)
{
    if(i<j)
    { 
        t=a[j]
        a[j]=a[i];
        a[i]=t;
    }
    k=nv2;
    while(k<=j)
    {
        j-=k;
        k>>=1
    }
    j+=k
}
le=1
for(m=1;m<=1;m++)
{
    lei=le
    le<<=1;
    u=conplex(1,0);
    tmp=pai/lei;
    w=complex(cos(tmp),-sin(tmp);
    for(j=0;j<lei;j++)
    {
        for(i=j;i<n;i+=le)
        {
            for(i=j;i<n;i+=le)
            {
                ip=i+lei;
                t=a[ip]*u;
                a[ip]=a[i]-t;
                a[i]+=t;
            }
            u*=w;
        }
    }
    return o;
}
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 如何在scanpy上做差异基因和通路富集?
    • ¥20 关于#硬件工程#的问题,请各位专家解答!
    • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
    • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
    • ¥30 截图中的mathematics程序转换成matlab
    • ¥15 动力学代码报错,维度不匹配
    • ¥15 Power query添加列问题
    • ¥50 Kubernetes&Fission&Eleasticsearch
    • ¥15 報錯:Person is not mapped,如何解決?
    • ¥15 c++头文件不能识别CDialog