samedi 21 mars 2020

Standard input C++

I need to take standard input to my .exe file from in.txt and push output to out.txt like:

$ a.exe < in.txt > out.txt

I know that with > you can forward output from std::cout to a file, but I don't know how to get input from a file like that.

Aucun commentaire:

Enregistrer un commentaire