2.1.10.63 _getdrive


Description

get the current working drive

Syntax

int _getdrive( )

Parameters

Return

returns the current (default) drive number (1 = A, 2 = B, and so on).

Examples

EX1

// This is a self contained sample program for the function _getdrive, 
// To run the program, enter the following command in the Script window:
//   _getdrive_ex1
// When it runs, a meassage will be printed like following:
//   Current drive is C

void    _getdrive_ex1()
{
    int        nCurrentDrive = _getdrive();
    printf("Current drive is %c\n", (char)(nCurrentDrive + 'A' - 1));
}

Remark

Get the current working drive.

See Also

Header to Include

origin.h

Reference