作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试使用 Dev-C++,但它无法正常工作,因为我无法在文件路径中运行带有空格的程序。看起来有人忘记了经常使用这样的字符。
我可以毫无问题地编译代码,但我无法运行它。
--------------------------------
Failed to execute "C:\Users\Crezary Wagner\Desktop\c++\multi.exe":
Error 193: %1 is not a valid Win32 application.
程序有效,但“Crezary Wagner”中有空间,现代 IDE 存在问题 :) 如何修复?
最佳答案
如果您将此路径作为字符串参数提供,您可以附加 \"
字符到字符串的起点和终点:
program2runStr = "\"" + program2runStr + "\"";
关于c++ - 如何在 DevC++ 中运行程序并在文件路径中使用空格?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33430599/
我是一名优秀的程序员,十分优秀!