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