Hi all.
I want get the length of a stdin. i.e
the program myprogram reads the test.txt and returns the length of the file test.txtCode:cat test.txt | myprogram
but i have always length = -1....Code:... FILE* stdin_stream = fdopen(STDIN_FILENO,"r"); //now i get the length fseek(stdin_stream,0,SEEK_END); length = ftell(stdin_stream);
why?