简体   繁体   English

命令提示输入和 Output

[英]Command Prompt Input and Output

I want to take data from 'input.txt' to run 'main.exe' and then save the result of that program with this data to 'output.txt'.我想从“input.txt”中获取数据来运行“main.exe”,然后将该程序的结果与这些数据一起保存到“output.txt”中。 If possible, I would like to write wwith form <input.txt> <output.txt>.如果可能的话,我想用表单 <input.txt> <output.txt> 来写。在此处输入图像描述

First you need to compile your c++ program, then run it with the two parameters.首先您需要编译您的 c++ 程序,然后使用这两个参数运行它。 See cplusplus.com for some tutorials on file in and file out and the resource for taking in command line arguments: https://www.geeksforgeeks.org/command-line-arguments-in-c-cpp/有关文件输入和文件输出的一些教程以及用于获取命令行arguments的资源,请参阅 cplusplus.com: httpscommand-/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 C++没有命令提示符输出? - C++ no command prompt output? Windows命令提示符输入说明 - Windows Command Prompt Input Explaination Windows 10 命令提示符的输出不正确 - Incorrect output from windows 10 command prompt 如何使控制台输出数据进入命令提示符? - How to get console output data into command prompt? 将某些输出重定向到命令提示符,将某些重定向到文件? - Redirect some output to command prompt, and some to file? 命令提示符关闭而不接受输入 - Command prompt closes without taking input 将命令提示符输出重定向到Visual Studio 2012中的输出窗口 - Redirect command prompt output to output window in Visual studio 2012 控制台有输入提示,然后在一个非常简单的程序上没有 output 关闭 - Console has input prompt then closes without output on a very simple program 如何在Windows上通过命令提示符输入对.exe文件的输入? - How to enter input to .exe file through command prompt on Windows? 该应用程序包括一个可执行文件,该文件要求用户在命令提示符下输入。 想要自动化,以便没有cmd提示打开 - Application to include an executable which ask user input in command prompt. Want to automate so that no cmd prompt opens
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM