Kdevelop使用参数执行项目 [英] Kdevelop execute project with parameters

查看:523
本文介绍了Kdevelop使用参数执行项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 Kdevelop 的新用户,我试图在C ++风格的基础上运行基于输入参数的项目2小时。



代码在这里:

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



我试图添加参数,但它是崩溃, p>

 过程错误 -  Kdevelop 
shell元素字符包含在文件启动的atguments中...

任何人都可以告诉我这是什么?我可以修复它,或者在哪里添加执行参数?



我把它们放在 Launch - >配置启动 - >行为 - >参数见下文





请帮助

解决方案

参数必须介于引号:

 /您的文件夹和路径/您的文件

 在此输入您的参数

而不是

 只是参数


I am new to Kdevelop and I am trying for 2 hours to run a project based on input parameters in C++ style.

The code is here:

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

I am trying to add the parameter, but it is crashing and saying

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

Can anyone tell me what is it about? Andhow can I fix it, or where shall I add the execution parameters?

I have placed them in the Launch -> Configuration Launches -> Behaviour -> Arguments see below

Please help

解决方案

The arguments must be between quotes:

"/your folder and path/Your file"

or

"enter your parameter here"

instead of

just the parameter

这篇关于Kdevelop使用参数执行项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆