私のプログラムは、コンピューターが表すことができる最小の浮動小数点数を計算する必要があります。ただし、コンパイルしようとすると、このエラーが発生し続けます。
[リンカーエラー]`WinMain@16'への未定義の参照が
1つの終了ステータスを返しました
これが私のこれまでのコードです。
#include <iostream>
#include <cstdlib>
#include <math.h>
#include <iomanip>
#include <string>
using namespace std;
float smallest()
{
float x=1.0;
while(1) {
if((x / 2) == 0.0) {
return x;
}
x = x / 2;
cout << "Approx smallest" << x << "float:" << endl;
}
system("PAUSE");
return(x);
}
私はC++を初めて使用するので、これがメインファイルに関連するエラーであると想定できますか?