SV: [LC++]NEWBIE: what is errno
Peter Poulsen
peter_poulsen at stofanet.dk
Sun Sep 23 20:49:04 UTC 2001
Carlo Wood wrote:
>
> On Fri, Sep 21, 2001 at 12:08:11PM +0200, Jarmo Paavilainen wrote:
> > Hi,
> >
> > "man errno" gives you all the answers you need.
> >
> > Basic usage is:
> >
> > #include <errno.h>
> > #include <stdio.h>
> >
> > ...Do something that sets errno...
> >
> > printf( "errno is: %d %s\n", errno, strerror( errno ));
> >
> > // Jarmo
>
> Shouldn't he subscribe to the C-programming mailinglist?
>
> If you're coding C++, the basic usage is:
>
> #include <cerrno> // Defines macro errno
> #include <cstring> // Defines std::strerror
> #include <iostream>
>
> ...Do something that sets errno...
>
> std::cout << "errno is: " << errno << ' ' << std::strerror(errno) << '\n';
>
I guess that i more c-like but that is the only info on network and
pthreads I have been able to find. Do anybody know of good links to
stuff about network and threads i c++ (for linux).
--
yours/mvh
Peter Poulsen
Naessundvej 208
9220 Aalborg East
Denmark
E-mail: peter_poulsen at stofanet.dk
Phone: +45 98 15 47 05
More information about the tuxCPProgramming
mailing list