system中有空格怎么办

原始路径:

C:\\Program Files\\putty\\putty.exe

改为:

char *cmd="C:\\\"Program Files\"\\putty\\putty.exe";
system(cmd);

实现putty自动代填:

system("C:\\\"Program Files\"\\putty\\putty.exe -ssh -l root -pw 123456 -P 422 111.111.111.111");

posted on 2014-04-28 16:37  上海—Michael  阅读(355)  评论(0编辑  收藏  举报