I should say that the txt is passed as a parameter in the program when executing it
./program < blahblah
This tells me you may be going about this wrong. Do you mean that you are trying to grab the arguments passed to your application when it is started from the command line?
with file being a text file, cin,getline will read the text file (well, actually its a redirection to the standard input)
and i want to read it ALL, because with cin.getline it will stop reading when it founds a \n.
EOF in an integer type .
cin.getline() stops at the character designated by third argument . In your case it does recognize char EOF so stops at '\n' ( which is default)