我已經寫了一個C++程序......在這裏我使用系統命令來調用Python程序與參數...C++系統命令
system("python /home/rpms/a3/dsp/noise_rem_python.py /home/rpms/a3/dsp/files/p1f%d.txt",tid);
/home/rpms/a3/dsp/noise_rem_python.py is a program name
/home/rpms/a3/dsp/files/p1f%d.txt
這個程序的參數。
,但我得到的錯誤是:
"/usr/include/stdlib.h: In function ‘void* writefile(void*)’: /usr/include/stdlib.h:712: error: too many arguments to function ‘int system(const char*)’ writefile.cpp:29: error: at this point in file"
什麼是tid); ? – BSen
C++並不神奇。如果空氣稀薄,它不會爲你排列一個字符串。 –