[Tutor] Re: Exceptions vs error codes
alan.gauld at blueyonder.co.uk
Fri Aug 20 21:21:01 CEST 2004
> K&R second edition (the ANSI C version, published in 1988) includes
> perror(), errno and strerror().
Yes, I really have no good reason for ever doubting its existence
on Windows. I just checked and even my old MS DOS Mix C compiler
(1986?) supported it (albeit with a limited set of error strings)
and both my Borland and Microsoft compilers (c1992-5) have had
perror() since Windows 3 appeared at least.
I really don't know why I never used it on Windows except that the
Windows API has its own file opening/closing functions and thus its
own error reporting calls. Maybe I just assumed that since they
were there perror() wasn't... Who knows...
But entirely my error (no pun intended!).
More information about the Tutor