诚心求助!!!
#include <iostream>
using namespace std;
int main()
{
int i=10,j=20,k=30;
cout <<"The large value of"
<<i<<"and"<<j<<"is"
<<(i>j?i:j)<<endl;
cout <<"The value of"<<i<<"is"
<<(i%2?"odd.":"even.")
<<endl;
int max=((i>j)?((i>k)?i:k):(j>k)?j:k);
cout <<"The large value of"
<<i<<","<<j<<"and"<<k
<<"is"<<max<<endl;
return 0;
}
这个程序我编译没有错误,执行的时候出现如下的错误:
fkf4701.obj : error LNK2005: _main already defined in fkf4801.obj
Debug/fkf4801.exe : fatal error LNK1169: one or more multiply defined symbols found
Error executing link.exe.
fkf4801.exe - 2 error(s), 0 warning(s)