I took this code from Andre LaMothe's Game Dev Series. The book is the Game Programming All-In-One by Bruno Miguel Teixeira de Sousa.
I can get this code to compile with the GNU g++ compiler, but the VC 6.0 compiler just won't do it. It give me a link error of:
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
Debug/IVA.exe : fatal error LNK1120: 1 unresolved externals
What kinda funny is that the code was written (according to the writer) with VC in mind.
Is there something wrong with the code, or is there something wrong with my VC 6.0 setup?
void CalcIVA(long Money, double IVA = 0.17);
cout << "Specifying the IVA value: $1000\n";
CalcIVA (1000, 0.12);
cout << "Using default IVA value: $1000\n";
void CalcIVA(long Money, double IVA)
MoneyWithIVA = Money * IVA;
cout << "Money after IVA at " << IVA << " is " << MoneyWithIVA << endl;