[C] 控制I/O设备 →→→→→进入此内容的聊天室

来自 , 2020-07-02, 写在 C, 查看 100 次.
URL http://www.code666.cn/view/10907813
  1. #include <stdio.h>
  2. #include <dir.h>
  3. #include <io.h>
  4.  
  5. int main(void)
  6. {
  7.    int stat;
  8.  
  9.    /* use func 8 to determine if the default drive is removable */
  10.    stat = ioctl(0, 8, 0, 0);
  11.    if (!stat)
  12.       printf("Drive %c is removable.\n", getdisk() + 'A');
  13.    else
  14.       printf("Drive %c is not removable.\n", getdisk() + 'A');
  15.    return 0;
  16. }
  17.  

回复 "控制I/O设备"

这儿你可以回复上面这条便签

captcha