funtc68b.dat

来自「C++指令字典 一个方便的软件 用于C++指令的查询」· DAT 代码 · 共 30 行

DAT
30
字号
read

#include <stdio.h>
#include <io.h>
#include <alloc.h>
#include <fcntl.h>
#include <process.h>
#include <sys\stat.h>
int main(void)
{
    void *buf;
    int handle, bytes;
    buf = malloc(10);
    if ((handle=open("TEST.$$$", O_RDONLY | O_BINARY, S_IWRITE | S_IREAD)) == -1)
    {
        printf("Error Opening File");
        exit(1);
    }
    if ((bytes = read(handle, buf, 10)) == -1)
    {
        printf("Read Failed.");
    exit(1);
    }
    else
        printf("Read: %d bytes read.", bytes);
    return 0;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?