问题 I have a program that calculates a lottery tickets (this tickets are in a file.txt), and writes the winners tickets in another file. I have a subfunction called evaluate_tickets(file, lottery_numers, winner....) In shell I write: ./program arg1 arg2... (arg1, arg2 are text files i.e. file.txt) But now, I want to do ./program < file.txt . The problem is that I don't know how to send the parameter "file" of evaluate_tickets because I receive information by stdin. 回答1: Define a stream pointer