printing error messages



Hi,
I am new to C so please bear with my stupid questions. I am
trying to open a file to write, but the code complains that it is
unable to do so. How do I get C to print the reason it is failing?
Something like the $! function in perl. Thanks a lot for all your
help.

.



Relevant Pages

  • Re: printing error messages
    ... I am new to C so please bear with my stupid questions. ... trying to open a file to write, but the code complains that it is ... I don't believe fopen is required to set errno when it fails, ...
    (comp.lang.c)
  • New NASCAR fan
    ... in the Deep South - but I just started watching NASCAR this season. ... I'm going to be asking lots of stupid questions so please bear with me...and nice to meet y'all! ...
    (rec.autos.sport.nascar)