Kdevelop执行带参数的项目

时间:2014-02-14 14:48:23

标签: c++ kdevelop

我是Kdevelop的新手,我正在尝试基于C ++风格的输入参数运行项目2个小时。

代码在这里:

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

请帮忙

1 个答案:

答案 0 :(得分:1)

参数必须在引号之间:

"/your folder and path/Your file"

"enter your parameter here"

而不是

just the parameter