简体   繁体   English

Windows命令提示符输入说明

[英]Windows Command Prompt Input Explaination

Could you help me understand this input into the command line : 您能帮我理解在命令行中的输入内容吗?

type direct-mapped.input | 键入direct-mapped.input | mem_sim 8 2 2 1 2 1 2 2 mem_sim 8 2 2 1 2 1 2 2

direct-mapped.input is a file with info that is read in a cpp file. direct-mapped.input是具有在cpp文件中读取的信息的文件。 mem_sim is the cpp file that has been compiled and the numbers following mem_sim are inputs into the cpp file. mem_sim是已编译的cpp文件,mem_sim之后的数字是输入到cpp文件中。

Also how are these values stored in the cpp file? 这些值也如何存储在cpp文件中?

Thanks in advance 提前致谢

In *nix and Windows operating systems, the numbers are not stored in the CPP file; 在* nix和Windows操作系统中,数字不存储在CPP文件中。 nothing will modify the source file. 什么都不会修改源文件。

The operating system stores the numbers in an argument list that is passed to the main function in your program (aka the 2nd parameter to main ). 操作系统将数字存储在传递给程序中main函数的参数列表中(又称main的第二个参数)。

ArgC  |  ArgV
--------------
0     |  mem_sim
1     |  8
2     |  2
3     |  2
4     |  1
5     |  2
6     |  2

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM