I'm currently working on my school project and wondered if there is any way to tell if user has written <textfile.txt to the terminal.
Like this: ./project <textfile.txt
My project reads all the lines from the text file to stdin and via scanf works with them. But when I don't use the <textfile.txt "thing", it starts without the data. Instead, I'd like it to write an error and stop the program.
Thanks a lot.