How to input a file when I do not know the name

I know how to read in text files when I know the name ("input.txt", etc.) and in the past when I did not know the name I would prompt the user to input it. But in this assignment meant it does not allow me to do either. Is there a way for my program to check for a text file in the project folder or something? It's my teacher's first year and he is being quite vague. I can post my code if anyone wants to see it.
Whether or not this is possible (I dont actually know), you should firstly email your teacher and ask him to clarify the assignment.
Perhaps input redirection or command line arguments?
I would google it, lots of examples
TarikNeaj + 1
Ask your teacher for clarification. A good way to put it would be something like:

"My understanding is that I am not allowed to ask the user for the input file name. I don't understand how I am supposed to get it from him unless I ask. Is there a way that you want me to do this?"

Hope this helps.
Topic archived. No new replies allowed.