For faster input, I read that you can do file-redirection
and include a file with the cin
inputs already set.
In theory it should be used like following:
App.exe inputfile outputfile
As far as I understood from C++ Primer book, The following C++ code[1] should be reading cin
input from the text file and shouldn't need to any other special indication like[2]
[2]
include <fstream>
ofstream myfile;
myfile.open ();
[1] The following C++ code...
#include <iostream>
int main()
{
int val;
std::cin >> val; //this value should be read automatically for inputfile
std::cout << val;
return 0;
}
Am I missing something?