Re: printing error messages
- From: roberson@xxxxxxxxxxxxxxxxxx (Walter Roberson)
- Date: Fri, 30 May 2008 16:18:48 +0000 (UTC)
In article <a13081bb-7012-480f-85e2-de62db236222@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
gsa <hsggwk@xxxxxxxxx> wrote:
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.
See the documentation on perror(). (Note: perror has some subtle
limitations that can make it a better idea to use the lower-level
equivilents... which you will likely find references to in the
perror() documentation.)
--
"To all, to each! a fair good-night,
And pleasing dreams, and slumbers light" -- Sir Walter Scott
.
- Follow-Ups:
- Re: printing error messages
- From: gsa
- Re: printing error messages
- References:
- printing error messages
- From: gsa
- printing error messages
- Prev by Date: Re: what is the output of this program?
- Next by Date: Re: FREE Tutorials on HTML XHTML CSS JavaScript XML XSL ASP SQL ADO VBScript, SAP - ABAP and more...
- Previous by thread: Re: printing error messages
- Next by thread: Re: printing error messages
- Index(es):