一个小程序编译时遇见错误,分析不出来,谢谢您啊
#include<iostream>
using namespace std;
const float PI=3.1416;
void main()
{
int iTpye;
float radius,a,b,area;
cout<<"what is the graphic types?(one circle,two rectangle,three square):";
cin>>iType;
switch(iType)
{
case 1:
cout<<"circle radius:";
cin>>radius;
area=PI*radius*radius;
cout<<"area is:"<<area<<endl;
break;
case 2:
cout<<"rectangle long is:";
cin>>a;
cout<<"rectangle width:";
cin>>b;
area=a*b;
cout<<"the area of rectangle is:"<<area<<endl;
break;
case 3:
cout<<"square side:";
cin>>a;
area=a*a;
cout<<"the area of square is:"<<area<<endl;
break;
default:
cout<<"it is a nonlicet value!"<<endl;
}
}
--------------------Configuration: division - Win32 Debug--------------------
Linking...
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/division.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
division.exe - 2 error(s), 0 warning(s)