Visual C ++ 2008 C ++ issues

I am trying to write a program to calculate a 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 this change, I got 2 compiler errors: C2563 and C2568. The program worked fine on another computer.

What can I do to fix this?

+1


source to share


2 answers


Is your project a Win32 console application or a Win32 application? If you are using normal main (int argc, char ** argv) make sure your application is a console application.



+1


source


You can switch to the console application by going to the project Properties , Configuration Properties , Linker , System . > editor. Then you can switch your SubSystem from Windows to the console (or vice versa). Make sure to do this for both Debug and Release configurations.



+1


source







All Articles