请问用vc6.0运行c++程序为什么不可以运行新建的?运行一个成功后,在新建一个就会出现如下错误
我用vc6.0运行c++程序为什么不可以运行新建的?运行一个成功后,在新建一个就会出现如下错误
Linking...
2-6.obj : error LNK2005: _main already defined in 4-2.obj
Debug/4-2.exe : fatal error LNK1169: one or more multiply defined symbols found
Error executing link.exe.
源程序:
#include<iostream.h>
void main(void)
{
int n,right_digit;
cout<<"Enter the number:";
cin>>n;
cout<<"Thenumber in reverse order is ";
do
{right_digit=n%10;
cout<<right_digit;
n/=10;
}
while(n!=0);
cout<<endl;
}
需要如何设定vc才能够运行 ?