You mix two concepts of arguments and pipelines.
The parameters you specified in the main function handle the arguments, not piping.
Pipe symbol | used to create pipelines, and this does not affect the arguments, it affects the input and output stream. < and > can be used to transfer from file to file.
What you add after calling the program is an argument, for example:
progam.exe arg1 arg2 arg3
They will be analyzed using the connector code in the program and will end up in the argv array when the main function is called.
When you use the < symbol to transfer a file to the program, the contents of the file will be sent to the program input stream:
program.exe < data.txt
The program will not have access to the console (screen and keyboard), instead, it will load data from the file.
When you use the > symbol to connect to a file, the program output goes to the file, not to the console. Example:
program.exe > result.txt
When you use the symbol | for transfer from one program to another, the output stream of the first program is the input stream of another program. Example:
program.exe | sort.exe
Everything that the first program writes to the output stream enters the input stream of another program. If you do not specify any input or output files, the first program has console input, and the second has console input. Thus, data is transmitted through two programs, for example:
[console] --> [program.exe] --> [sort.exe] --> [console]
You can broadcast several programs so that the data passes from the first program to the last. Example:
program.exe | sort.exe | more.exe
Then the data is transmitted through all three programs:
[console] --> [program.exe] --> [sort.exe] --> [more.exe] --> [console]
(The .exe extension is usually not required when specifying a program, I just included it here to clearly distinguish between programs, arguments, and files.)