简体   繁体   中英

How to run program in DevC++ and with space in file path?

I am trying to use Dev-C++ but it is not working since I can not run programs with space in file path. It looks that somebody forget that such character is often used.

I can compile code without problem but I can not run it.

--------------------------------
Failed to execute "C:\Users\Crezary Wagner\Desktop\c++\multi.exe":
Error 193: %1 is not a valid Win32 application.

Program is valid but in "Crezary Wagner" is space and there is problem for modern IDE :) How to fix it?

if you are giving this path as some string argument, you can append \\"

character to the starting and ending points of the string:

program2runStr = "\"" + program2runStr + "\"";

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM