Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Turbo C - <b>getcurdir() get current directory</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
getcurdir()              Get Current Directory

 #include   <dir.h>

 int        getcurdir(drive,direc);
 int        drive;                       Drive number
 char       *direc;                      Pointer to directory name

    getcurdir() gets the name of the current working directory for
    'drive'.  'drive' contains a drive number (0 = default, 1 = A, etc).
    'direc' points to an area of memory where the directory name will be
    placed.  The area is of length MAXDIR. The name is null-terminated
    and does not contain the drive specification; nor does it begin with
    a backslash.

    Returns:    0 on success, or -1 on error.

See Also: free() getcwd()

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