Looking to use C++ to take input from a file in Unix.
Filename could be any name at any address such as:
$ ./a.out < /some_address/inputfile.txt
In my file I'm just trying to open it and put every space separated value in a vector (assuming integers for now). Whats the problem I keep getting my "unable to open" condition.
Pay attention to the < in the command. It has a special meaning. It makes so that when the program reads input (using std::cin, std::scanf, etc.) it will read it from the file you have on the right instead of the terminal. Your program does not receive any arguments. Simply use std::cin to read the input.