只有1条错误消息:1d返回1退出状态,C ++

时间:2016-04-03 22:57:52

标签: c++ exit status

我试图编译它,它未完成但它应该仍然运行:

#include <iostream>
using namespace std;
int main()
{
int hI = 1.5;
int gc = 9.8;
int Velocity;
int Angle;
cout << "Please enter the velocity of the ball at the release in m/s";
cin >> Velocity;
cout << "Please enter the angle of the velocity vector at the time of release in degrees";
cin >> Angle;
return 0;
}

我构建它时只收到一条错误消息:1d返回1退出状态,为什么? 什么都有帮助谢谢

1 个答案:

答案 0 :(得分:0)

可能是因为hI是int并且你为它指定了一个浮点数,对于gc

也是如此