【发布时间】:2011-11-16 16:04:38
【问题描述】:
是什么导致了这个错误?我用谷歌搜索了它,我发现的前几个解决方案是库和主要功能有问题,但在我的问题上似乎都很好,我什至都重新输入了!这可能是什么原因造成的?
这可能会有所帮助:
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;
}
【问题讨论】:
-
发布完整错误。哪个是未解析的符号?
-
未解析的符号是?请提供完整的错误文本。
-
您还应该收到 LNK2001 错误,其中列出了未解决的问题。那些是什么?
-
很抱歉,直到你们说了些什么,才意识到还有更多内容 - 更新问题
标签: c++ visual-studio-2010 main fatal-error