-4
我想使用微软的Visual Studio专业2010编译这段代码和它给了我一个生成错误LNK1120致命错误:1周无法解析的外部。 下面的代码...C++ LNK1120致命错误:1周无法解析的外部
// Program Typos prints three integer numbers, sums the numbers, calculates
// the average, and prints the sum and the average of the three numbers.
#include <iostream>
#include <iomanip>
using namespace std;
const int ONE = 5;
const int TWO = 6;
const int THREE = 7;
int main()
{
int sum;
float average;
cout << fixed << showpoint;
cout << setw(5) << ONE << TWO << THREE << endl;
sum = ONE + TWO + THREE;
average = sum/3;
cout << " The sum is " << sum << " and the average is " \
<< average <<endl;
return 0;
}
粘贴整个错误 – 2012-02-27 00:13:38
有什么无法解析的外部?这编译好。 – birryree 2012-02-27 00:13:41
你的错误在别处。你没有彻底准备这个问题。 – 2012-02-27 00:16:48