## Mike182

Im trying to finish this calculator program, its for a writing rpg on a forum, for a post you get
line count
creativity rating
and difficulty rating
using these 3 things you use a special formula to find out the final power level, this code compiles ok, but when it builds it gives the following link errors:
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
Debug/calc.exe : fatal error LNK1120: 1 unresolved externals

Heres the code, help appreciated:

``````#include <iostream.h>
#include <cstdio>
#include <cmath>
#include <string>

using namespace std;

int main()
{
char name [100];
char quit;
quit ='\0';
while (quit !='q')
{
system("title Average Calculator");
system("color 84");
float creat, diff, lines, pl, x, z; //loads integers into memory
cout <<"This is a simple power level calculator"<< endl;
cout<<"What is your characters name?"<< endl;
cin.getline (name,100);
cout<<"Hello, " << name << "."<<  endl;
cin>> pl;
cout<<"Put in your creativity points:"<< endl;
cin>> creat;
cout<<"Put in your line count:"<< endl;
cin>> lines;
x = pl*(10*diff)+(10*creat)+(2*lines); //makes z integer equal to all grades added together (starting division equation)
z = x/150*(lines*(pl/1.5)); //makes the x integer equal to z (to make me less frustrated)
cout<<""<< endl;
cout<<"Q - Quit"<< endl;
cout<<"R - Repeat"<< endl;
cout<<"Please type in the corresponding letter for your choice then press enter."<< endl;
cin>> quit;
cout<<"Goodbye, " << name << "."<< endl;
system("PAUSE");
system("cls");
}

return 0;
}``````

## zyruz

You're using a Win32 application project when you want a console application project. Win32 applications expect WinMain instead of main.