I'm having a problem to find information about what these command does, what do they return and how to get them on my application in c++. That's an exercise and this is how I need to get the input file I'll be reading from and the output file I'll writing to:
myApp < input.txt > output.txt
I tried to access it using:
int main(int argc, char** argv){
cout << argv[1] << endl;
}
But I didn't get anything back. I suspect that the argv[1] is an ifstream or something like that. What is it? Or it comes to my main function as a simple string? Should I receive more parameters on int main to get the "<" and ">" as files?
The answer suggested doesn't solve my problem. I wanted to know how the < and > commands work and the link suggested shows how to use piped cin and cout. Now I know it's a piped cin and cout, but I didn't know how the command line worked and linked to that.
Thank you!