这个错误是什么原因造成的?我谷歌了一下,发现前几个解决方案都说库或主函数有问题,但在我的情况下它们似乎都没问题,我甚至重新打了一遍!可能是什么原因导致的呢?
这可能有所帮助:
MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol WinMain@16 referenced in function __tmainCRTStartup
#include <iostream>
using namespace std;
int main()
{
const double A = 15.0,
B = 12.0,
C = 9.0;
double aTotal, bTotal, cTotal, total;
int numSold;
cout << "Enter The Number of Class A Tickets Sold: ";
cin >> numSold;
aTotal = numSold * A;
cout << "Enter The Number of Class B Tickets Sold: ";
cin >> numSold;
bTotal = numSold * B;
cout << "Enter The Number of Class C Tickets Sold: ";
cin >> numSold;
cTotal = numSold * C;
total = aTotal + bTotal + cTotal;
cout << "Income Generated" << endl;
cout << "From Class A Seats $" << aTotal << endl;
cout << "From Class B Seats $" << bTotal << endl;
cout << "From Class C Seats $" << cTotal << endl;
cout << "-----------------------" << endl;
cout << "Total Income: " << total << endl;
return 0;
}