求助帖,同样一段代码在vc6上运行没问题,在vs2017运行有问题,求解答
望晓天 2018-10-14 11:01:09 int kind, Need;
cin >> kind >> Need;
Yuebing *a = new Yuebing[kind];
for (int i = 0; i < kind; i++)
cin >> a[i].count;
for (int i = 0; i < kind; i++)
{
cin >> a[i].Value;//在vs2017中运行到这里卡住,断点查看直接跳到输入界面(已经输入所有待输入数据) ,vc6 运行通过
a[i].GetPer();
}
月饼类
class Yuebing {
public:
float count;//保存月饼数量
float Value;//月饼总价值;
float per;//月饼单价(性价比)
public:
Yuebing()
{
count = 0;
Value = 0;
}