heres the code i used:
// This program asks the user to enter two numbers then,
// the program will see whicih is smaller or greater.
#include <iostream>
using namespace std;
int main()
{
double num1;
double num2;
//prompts the user
cout << "Enter a program and press ENTER: ";
cin >> num1;
cout << "Enter a number and press ENTER: ";
cin >> num2;
if (num1 > num2)
{
cout << num1 << " is bigger than " << num2;
}
else
{
cout << num1 << " is smaller than " << num2;
}
return 0;
}
The output i got was this:
>------ Build started: Project: minimum_maximum, Configuration: Debug Win32 ------
1>Compiling...
1>max_min.cpp
1>Linking...
1>MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
1>C:\Users\liblab107\Documents\Visual Studio 2008\Projects\minimum_maximum\Debug\minimum_maximum.exe : fatal error LNK1120: 1 unresolved externals
1>Build log was saved at "file://c:\Users\liblab107\Documents\Visual Studio 2008\Projects\minimum_maximum\minimum_maximum\Debug\BuildLog.htm"
1>minimum_maximum - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
i am really confused on why it isn't buliding or compiling....

New Topic/Question
Reply




MultiQuote




|