c++程序编译时一直出现: 致命错误C1004:想不到文件尾端发现,怎么解决啊?

2024-12-30 04:24:32
推荐回答(2个)
回答1:

link[v].v[k1].u = goods[z-1].price;
k1++;
cout << "名称:" << goods[z-1].nam << endl << "价格:" << goods[z-1].price << "亿美元/件" << endl << "数量:" << goods[z-1].numbers << "销量:" //输出想要查看的商品信息
<< goods[z-1].sales_volume << endl << "评分:" << goods[z-1].grade << endl << "人气:" << goods[z-1].popularity << endl << "您是否购买? Y/N:";
cin >> a1;
goods[z-1].popularity += 1; //浏览该商品后人气值加1
if (a1 == 'N')
goto p3; //跳转到上面
else if (a1 == 'Y') //购买
{
goods[z-1].sales_volume += 1; //销量加1
int s1, s2;
cout << "请输入购买的件数:";
cin >> m;
cout << "1 加入购物车" << endl << "2 结算:";
cin >> s1;
if (s1 == 1) {
link[v].v[k1].y = m;
int h1;
cout << "请您为该商品评分:";
cin >> h1; //为商品评分
goods[z-1].grade = h1;
goto p3; //跳转到上面继续购物
}
} else if (s1 == 2) //结算

回答2:

应该是括号的问题吧,没有匹配的