Imagine the following command:
./functions < file.txt
In my main() from functions.cpp, how am I able to catch the data given through the '<' ?
I'm pretty sure I have to use std::cin
but besides prompting the user for info I don't know how it can apply here.
std::string file_passed;
std::cin >> file_passed; // prompts user
file_passed << std::cin; // error
It's a noob question, but I can't find the answer anywhere... thanks.