c++ - kdevelop 带参数执行项目

标签 c++ kdevelop

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

代码在这里:

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 -> Behavior -> Arguments 中,见下文

Print Screen

请帮忙

最佳答案

参数必须在引号之间:

"/your folder and path/Your file"

"enter your parameter here"

代替

just the parameter

关于c++ - kdevelop 带参数执行项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21782403/

相关文章:

c++ - kdevelop 使用 ctags

c++ - 变量或字段 'psort' 声明无效

unix - 如何在 kdevelop 中递归地忽略符号链接(symbolic link)或目录?

c++ - C++ 新手, undefined reference

c++ - 数组/vector/其他中的 Int 模板

c++ - 如何使用 Linux 工具找到导致声明的包含链?

c++ - KDevelop 没有看到 C++ 头文件

c++ - 构建没有文件名修饰的 Boost?

c++ - Qt:移动到线程

c++ - 关于foreach循环和性能的几个问题