在终端中可以从用下面命令获得帮助:

  man system

 

在c/c++代码中实现和在终端中输入的命令行一样的效果,以命令(audacious -p &)为例,该代码实现用audacious在后台播放音乐的功能,当然前提是安装了audacious。

c++代码:

1    #include <cstdlib>
2    int main()
3    {   
4        system("audacious -p &");
5        return 0;
6   }

编译执行即可。

相关文章:

  • 2022-12-23
  • 2022-01-04
  • 2021-07-23
  • 2022-01-11
  • 2022-02-27
  • 2021-06-22
猜你喜欢
  • 2021-12-05
  • 2022-12-23
  • 2021-05-01
  • 2021-11-30
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案