-4
私はこのコードをMS Visual Studio Professional 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;
}
エラー全体を貼り付けます。 –
未解決の外部とは何ですか?これはうまくコンパイルされます。 – birryree
あなたのエラーは他の場所にあります。あなたはこの質問を完全に準備していませんでした。 –