Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ Language Reference - open http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   open

   Usage
   #include <io.h>
   int open(char *pathname,int rwmode);

   Description
   Opens the file specified by pathname. rwmode selects the mode in which
   the file is opened. The values for rwmode are to be found in dos.h and
   are:

   O_RDONLY  read
   O_WRONLY  write

   This function is implemented as a direct hook to DOS. Other values can
   be  passed  to DOS (see your MSDOS manual for  more  information)  but
   values which are undefined to DOS should never be passed via open.

   Return Value
   Returns  the  file  descriptor  (fd) if successful,  -1  if  an  error
   occurred. errno is set upon error.


See Also: close creat dos_creat fopen

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson