Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C Library Reference - <u>synopsis:</u> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <direct.h>
    int _getdrive( void );

Description:
    The _getdrive function returns the current (default) drive number.

Returns:
    A value of 1 is drive A, 2 is drive B, 3 is drive C, etc.

Example:
    #include <stdio.h>
    #include <direct.h>

    void main()
      {
        unsigned drive;

        printf( "The current drive is %c\n",
                    'A' + _getdrive() - 1 );
      }

    produces the following:

    The current drive is C

Classification:
    DOS

Systems:
    DOS, Windows, Win386, Win32, OS/2 1.x(all), OS/2-32

See Also:
    _dos_getdiskfree, _dos_getdrive, _dos_setdrive, _getdiskfree

See Also: _dos_getdiskfree _dos_getdrive

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