Try to do some programming under Linux.
The programme I am writing is supposed to read all the char from a file via "command in line argument (i.e. agv)" and via redirection (i.e. read <FILE_NAME.
In my program, I have written:
stream = fopen(argv,"r");
if (stream==NULL) /*The file name is not in the command line argument*/
I am wondering what I should do now to check if there is a redirection stdin.