On Wed, Oct 1, 2008 at 9:15 PM, Bill Cunningham <[EMAIL PROTECTED]> wrote:
>    Can someone show me an example of how to use perror? For example,
>
> if((fp=fopen("file","wb"))==NULL
>    perror() /* What goes into the char *string parameter */

Typically you pass in a prefix, like the name of the program being
run, and it prints out a string corresponding to the global variable
errno (as returned by strerror). So the output to strerror is

<PREFIX>: <error message>

-- Brett
------------------------------------------------------------
"In the rhythm of music a secret is hidden;
    If I were to divulge it, it would overturn the world."
               -- Jelaleddin Rumi

Reply via email to