Error executing cl.exe. 错误比较多,麻烦大神帮忙看看~

#include"iostream.h"
#include"math.h"
class cos
{
int du;
double c,x;
public:
cos(int dul)
{du=dul;
}
void hdu();
void process();
void print();
};

void cos::hdu()
{x=(du*3.1415926)/180;
}

void cos::process()
{
c=0;
double n,m,k,s=1;
for(n=0;m<10e-6;n=n+2)
{
for(k=1;k<=n;k++)
{s=k*s;
}
m=pow(x,n)/s;
c=c+m;
}
}

void cos::print()
{cout<<c<<endl;
}

main()
{
cos t1(90);
t1.process;
t1.print;

}

C:\Documents and Settings\Administrator\桌面\319_10.cpp(41) : error C2146: syntax error : missing ';' before identifier 't1'
C:\Documents and Settings\Administrator\桌面\319_10.cpp(41) : warning C4551: function call missing argument list
C:\Documents and Settings\Administrator\桌面\319_10.cpp(41) : error C2065: 't1' : undeclared identifier
C:\Documents and Settings\Administrator\桌面\319_10.cpp(42) : error C2228: left of '.process' must have class/struct/union type
C:\Documents and Settings\Administrator\桌面\319_10.cpp(43) : error C2228: left of '.print' must have class/struct/union type
C:\Documents and Settings\Administrator\桌面\319_10.cpp(45) : warning C4508: 'main' : function should return a value; 'void' return type assumed
Error executing cl.exe.
错误多多
麻烦帮忙看看

繁星淼淼
浏览 178回答 3
3回答

守候你守候我

t1.process;t1.print;这两句改成t1.process();t1.print();它们是成员函数。

繁花如伊

改成void main()C++的main必须有返回值类型的

潇湘沐

main函数所在的文件没有include类cos声明的.h文件。
打开App,查看更多内容
随时随地看视频慕课网APP