I was writing a C++ program in visual studio 2013 and the
program is very simple one and when I compile there was error
this is third time I see this error.
Here's the program:
#include
using namespace std;
int main()
{
int x, y, z = 0;
char c;
bool quit = true;
while (quit == true)
{
cout << "enter a number : ";
cin >> x;
cout << "enter a sign : ";
cin >> c;
cout << "enter another number : ";
cin >> y;
if (c == '+')
z = x + y;
if (c == '-')
z = x - y;
if (c == '*')
z = x * y;
if (c == '/' && y != 0)
z = x / y;
if (c == 'q')
quit = false;
cout << "Answer is : " << z << endl;
}
return 0;
}
...and here's the error:
1>------ Build started: Project: Calculator_madeByMe, Configuration: Debug Win32 ------
1> Source.cpp
1>MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
1>C:\Users\Sorena\documents\visual studio 2013\Projects\Calculator_madeByMe\Debug\Calculator_madeByMe.exe : fatal error LNK1120: 1 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========>
No comments:
Post a Comment