I have made a simple program to read the contents of a file.The FILE
pointer returns NULL at the very beginning eventhough the file is
present.Now if I modify my program and use command line arguments
instead, I get the desired output.Now after I have run this program
with argv; and I shift back to the one without command line arguments
and run it ,it works.Why doesn't it work in the beginning itself?
I am using Turbo C++ (DOS).I tried it in devc++ but there it doesn't
work at all.
pointer returns NULL at the very beginning eventhough the file is
present.Now if I modify my program and use command line arguments
instead, I get the desired output.Now after I have run this program
with argv; and I shift back to the one without command line arguments
and run it ,it works.Why doesn't it work in the beginning itself?
I am using Turbo C++ (DOS).I tried it in devc++ but there it doesn't
work at all.
Comment