所以我决定安装 Eclipse CDT 作为我选择的 IDE。然而,似乎一旦我开始运行需要输入的 C 程序,Eclipse 就决定停止运行控制台窗口中的文件。我尝试在任务管理器中关闭该程序的所有实例,并且我在计算机上找到的 exe 文件运行良好。我尝试构建该文件,然后运行,但 Eclipse 说我“没有什么可构建的”。有任何想法吗?
Code:
#include <stdio.h>
int main(void) {
int length, width, height, volume, weight;
printf("Enter the length of box: ");
scanf("%d", &length);
printf("Enter the height of box: ");
scanf("%d", &height);
printf("Enter the width of box: ");
scanf("%d", &width);
volume = length * width * height;
weight = ((volume/166.0) + 0.5);
printf("Volume(cubic inches) %d\n", volume);
printf("Dimensional weight(pounds): %d\n", weight);
return 0;
}
我刚刚尝试过这个并且它有效:
转到运行 - 运行配置 - C / C++ - 你的 Exe
单击“参数”选项卡
在工作区部分取消选中“使用默认值”
然后选择exe所在的目录,例如调试
![enter image description here](https://i.stack.imgur.com/dinJe.jpg)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)