【发布时间】:2009-01-16 19:18:52
【问题描述】:
我有这个 C++ 程序:
#include <iostream>
using namespace std;
int main()
{
char buf[50];
cin.getline(buf,49);
system(buf);
return 0;
}
当我运行并编译它并输入例如“helo”时,我的程序会打印错误:
"helo" not found.
我可以阻止显示此错误吗?有没有办法从系统命令中禁用错误?
【问题讨论】:
标签: c++ external-process standard-error