gpt4 book ai didi

C++ "Program has stopped working"

转载 作者:太空宇宙 更新时间:2023-11-04 16:10:44 25 4
gpt4 key购买 nike

我正在为类编写一个程序。该程序可以编译,但是当我输入一个长度值时,会弹出一个窗口,提示“Pipeprogram.exe 已停止工作”。然后它继续说“一个问题导致程序停止正常工作。Windows 将关闭该程序并通知您是否有可用的解决方案”。

到目前为止,通过谷歌搜索,我没有找到任何解决方案。如果有人可以提供帮助,我们将不胜感激。

enter image description here

enter image description here

enter image description here

最佳答案

您需要使用 & 将指针传递给 scanf。所以,

scanf("%f", &length);

关于C++ "Program has stopped working",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29025214/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com