Help me! I don't know why

This is my code, test my PC is failed, but test another PC is succeed. I don't know why, please help me...
<code>
#include <iostream>
#include <math.h>
using namespace std;
int main ()
{
double x, y, z;
cout<<"X: ";
cin>>x;
cout<<"Y: ";
cin>>y;
z=x*x+y*y;
cout<<"Z: "<<z<<endl;
return 0;
}
</code>
complier:
1>------ Build started: Project: Lab 1, Configuration: Debug Win32 ------
1>Build started 09/03/2013 12:29:15 AM.
1>InitializeBuildStatus:
1> Touching "Debug\Lab 1.unsuccessfulbuild".
1>ClCompile:
1> 2.cpp
1>2.obj : error LNK2005: _main already defined in 1.obj
1>E:\Study\University of Technology\Hoc C++\C++ Ex\Lab 1\Debug\Lab 1.exe : fatal error LNK1169: one or more multiply defined symbols found
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:02.51
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Is there another source file in this project that also has a main function? That error is because you have two definitions for main.
Topic archived. No new replies allowed.