2014-02-14 39 views
2

我是Kdevelop的新手,我嘗試了2個小時來運行基於C++風格的輸入參數的項目。Kdevelop執行項目的參數

的代碼是在這裏:

int main(int argc, char** argv) 
{ 
    std::string s = args[1] 
    std::cout<<s<<std::endl; 
} 

我試圖添加參數,但它崩潰,說

Process Error - Kdevelop 
A shell meta character was included in the atguments for file launch ... 

誰能告訴我它是什麼?我怎樣才能修復它,或者我應該在哪裏添加執行參數?

我已經把他們在Launch -> Configuration Launches -> Behaviour -> Arguments見下文

Print Screen

請幫

+0

,通常是做到這一點的方式,使有可能出錯了,你要添加的參數。你可以發佈他們嗎? – Job

+0

我應該像終端模式那樣發佈它們:'./..//// myfold/myPic.jpg'嗎?我把它們放在'/ home/usr/Pictures/pic.jpg' –

+0

'。/ .. // .. // ......'不起作用 –

回答

1

的參數必須是引號之間:

"/your folder and path/Your file" 

"enter your parameter here" 

,而不是

just the parameter