zoukankan      html  css  js  c++  java
  • 相关函数

    一:

        1_3:  (1) DIR *opendir(const char *name);    <dirent.h>

                 (2) DIR *fdopendir(int fd);                    

                              On error, NULL is returned;

                 (3) struct dirent *readdir( DIR *dp)        <dirent.h>

                              On error, NULL is returned;

                 (4) int closedir(DIR *dp);                      <dirent.h>

                              0 on success, -1 on error.

        1_4:  (1) ssize_t read(int fd, void *buf, size_t count);        

                      On success, return the number of bytes read, maybe smaller than count, and the file position is advanced by the number.

                      On error, -1 returned.

                (2) ssize_t  write(int fd, void *buf, size_t count);

                     On success, return the number of bytes writetten, maybe bigger than count.

        1_5: (1) int getc(FILE *stream);   <stdio.h>

                    On success, return the charactor read as an unsigned char cast to an int, or EOF end of file.

                (2) int putc(int c, FILE *stream)     <stdio.h>

                    On success, return the haractor read as an unsigned char cast to an int.

                    On error, return EOF.

        1_6: (1) pid_t getpid(void);      <unistd.h>

                      return the process ID of the calling process.

                     pid_t getppid(void);

                      return the process ID of the parent of the calling process.

        1_7: (1)  char *fgets(char *s, int size, FILE *stream);

                      fgets() reads in at most one less than size characters from stream and stores them into the buffer pointed to by s.  Reading stops after an EOF or a newline.

                      On success, return s.

                      Return NULL, on error or shen EOF occurs while no charactor have been read.

       

         

  • 相关阅读:
    npm install遇到的问题
    已经安装了node和npm,输入node -v 未找到命令
    虚拟机VMware搭建代码环境
    使用VMware出现的各种问题
    bind、delegate、on的区别
    软件设计原则
    Qt 模型/视图/委托
    UML类图与类间六种关系表示
    C++内存分配与释放
    SQLite 自定义函数,聚合,排序规则
  • 原文地址:https://www.cnblogs.com/gavinwu/p/4143229.html
Copyright © 2011-2022 走看看