views:

288

answers:

3

I'm trying to write a program to calculate the quadratic formula. When I run it, I get 2 error messages:

error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
fatal error LNK1120: 1 unresolved externals

this is after I changed the last line of code from ...:

<< danswer1, danswer2 >>

to

<< danswer1 << "," << danswer2 <<

Before I made that change I got 2 compiler errors: C2563 and C2568. On a friend's computer the program worked perfectly.

What can I do to fix this?

+1  A: 

Is your project a Win32 Console Application or a Win32 Application? If you are using regular main(int argc, char** argv), then make sure your app is a console app.

PiNoYBoY82
+1  A: 

You can change to a console app by going to the Project Properties, Configuration Properties, Linker, System editor. You can then switch your SubSystem from Windows to Console (or vice-versa). Make sure to do this for both your Debug and Release configurations.

Frank Krueger
A: 

It works now! Thank you!

Mark the answer that helped you correct, or at least comment on the correct answer. thanks.
Kent Fredric