如果我们需要在程序中调用终端方法 使用方法 system(""); 在方法中写入你所需要的操作即可,例如 清屏 : system("cls");(linux下命令为clear)。 暂停:system("pause").