I would like to take numbers from a .txt file and input them through the command line into a program like the example below. I run the exe using ./program < input.txt. However it prints random numbers. What am I doing wrong?
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
//print 1st number
cout << argv[1];
}