标题:MFC程序syntax error “=” 不会改求大神帮忙!!1
只看楼主
ldrwhu
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2016-10-23
 问题点数:0 回复次数:2 
MFC程序syntax error “=” 不会改求大神帮忙!!1
void CGSDlg::OnButton1()
{
    // TODO: Add your control notification handler code here
    CString str;
    if(operation==0)
    {
        double a0,a2,a4,a6,a8,X;

        double B;

        
        m_b.GetWindowText(str);

        B = atof(str)*PI/180;


        a0 = 1+3.0/4*e1*e1+45.0/64*pow(e1,4)+350.0/512*pow(e1,6)
            +11025.0/16384*pow(e1,8);

        a2 =-1.0/2*(3.0/4*e1*e1+60.0/64*pow(e1,4)+525.0/512*pow(e1,6)
            +17640.0/16384*pow(e1,8));

        a4 = 1.0/4*(15.0/64*pow(e1,4)+210.0/512*pow(e1,6)
            +8820.0/16384*pow(e1,8));

        a6 = -1.0/6*(35.0/512*pow(e1,6)+2520.0/16384*pow(e1,8));

        a8 = -1.0/6*(35.0/512*pow(e1,6)+2520.0/16384*pow(e1,8));

        X = a*(1-e1*e1)*(a0*B+a2*sin(2*B)+a4*sin(4*B)+a6*sin(6*B)+a8*sin(8*B));

        double p,t,n,V,N,c,l0,L0,L00,e2,Rou,Eta;

        m_l.GetWindowText(str);
        L0 = atof(str)*PI/180;

        m_zxjd.GetWindowText(str);
        L00 = atof(str)*PI/180;
        l0 = (L0-L00)*3600;
        
        t = tan(B);
        Rou = 180*3600/PI;
        
        e2 = sqrt((a*a-b*b)/(b*b));
        N=a/sqrt(1-e1*e1*sin(B)*sin(B));
        Eta=e2*cos(B);
        

        double x,y;

        x = X + N/(2*Rou*Rou)*sin(B)*cos(B)*l0*l0+
        N/(24*pow(Rou,4))*sin(B)*pow(cos(B),3)*(5-t*t+9*Eta*Eta+4*pow(Eta,4))*pow(l0,4)+
        N/(720*pow(Rou,6))*sin(B)*pow(cos(B),5)*(61-58*t*t+pow(t,4))*pow(l0,6);

        y = N/Rou*cos(B)*l0+
        N/(6*pow(Rou,3))*pow(cos(B),3)*(1-t*t+Eta*Eta)*pow(l0,3)+
        N/(120*pow(Rou,5))*pow(cos(B),5)*(5-18*t*t+pow(t,4)+14*Eta*Eta-58*Eta*Eta*t*t)*pow(l0,5);

        char buf[15];
        sprintf(buf,"%f",x);
        m_x.SetWindowText(buf);

        sprintf(buf,"%f",y);
        m_y.SetWindowText(buf);
   
    }
搜索更多相关主题的帖子: double control operation 
2016-10-23 20:54
ldrwhu
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2016-10-23
得分:0 
求大神帮忙 跪谢 急用!!!
2016-10-23 20:54
仰望星空的
Rank: 5Rank: 5
等 级:贵宾
威 望:16
帖 子:50
专家分:248
注 册:2015-9-28
得分:0 
是不是你的PI用的不对啊,稍微看了一下,没看出什么错误来~
2016-10-28 08:29



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-470177-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.260153 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved