`

stdio.h文件介绍

 
阅读更多

一般会把用来#include的文件的扩展名叫.h,称其为头文件。

#include文件的目的就是把多个编译单元(也就是c或者cpp文件)公用的内容,单独放在一个文件里减少整体代码尺寸;或者提供跨工程公共代码。

目录

简介

使用

1.调用

2.stdio.h中的标准输入输出函数

3.stdio.h中内容

4.宏定义部分

5.结构体部分

6.文件操作函数定义

7.格式化输出

简介

使用

1.调用

2.stdio.h中的标准输入输出函数

3.stdio.h中内容

4.宏定义部分

5.结构体部分

6.文件操作函数定义

7.格式化输出

  

stdio 就是指 “standard buffered input&output"

  意思就是说带缓冲的标准输入输出!

  所以了,用到标准输入输出函数时,就要调用这个头文件!

调用

  #include <stdio.h>

  在TC2.0中,允许不引用此头文件而直接调用其中的函数,但这种做法是不标准的。

stdio.h中的标准输入输出函数

  int getchar() //从标准输入设备读入一个字符,显示

  int putchar() //向标准输出设备写一个字符

  int scanf(char *format[,argument…]) //从标准输入设备读入数据

  int printf(char *format[,argument…]) //格式化字符串输入到标准输出设备

  int puts(char *string) //输出一个字符串到标准输出设备

  char *gets(char *string) //从标准输入设备读入一个字符串

  int sprintf(char*string,char*format[,…])//格式化一个字符串输出到字符数组中,不显示

stdio.h中内容

  /*

  * stdio.h

  * This file has no copyright assigned and is placed in the Public Domain.

  * This file is a part of the mingw-runtime package.

  * No warranty is given; refer to the file DISCLAIMER within the package.

  *

  * Definitions of types and prototypes of functions for standard input and

  * output.

  *

  * NOTE: The file manipulation functions provided by Microsoft seem to

  * work with either slash (/) or backslash (\) as the directory separator.

  *

  */

宏定义部分

  #ifndef _STDIO_H_

  #define _STDIO_H_

  /* All the headers include this file. */

  #include <_mingw.h>

  #ifndef RC_INVOKED

  #define __need_size_t

  #define __need_NULL

  #define __need_wchar_t

  #define __need_wint_t

  #include <stddef.h>

  #define __need___va_list

  #include <stdarg.h>

  #endif /* Not RC_INVOKED */

  /* Flags for the iobuf structure */

  #define _IOREAD 1 /* currently reading */

  #define _IOWRT 2 /* currently writing */

  #define _IORW 0x0080 /* opened as "r+w" */

  /*

  * The three standard file pointers provided by the run time library.

  * NOTE: These will go to the bit-bucket silently in GUI applications!

  */

  #define STDIN_FILENO 0

  #define STDOUT_FILENO 1

  #define STDERR_FILENO 2

  /* Returned by various functions on end of file condition or error. */

  #define EOF (-1)

  /*

  * The maximum length of a file name. You should use GetVolumeInformation

  * instead of this constant. But hey, this works.

  * Also defined in io.h.

  */

  #ifndef FILENAME_MAX

  #define FILENAME_MAX (260)

  #endif

  /*

  * The maximum number of files that may be open at once. I have set this to

  * a conservative number. The actual value may be higher.

  */

  #define FOPEN_MAX (20)

  /* After creating this many names, tmpnam and tmpfile return NULL */

  #define TMP_MAX 32767

  /*

  * Tmpnam, tmpfile and, sometimes, _tempnam try to create

  * temp files in the root directory of the current drive

  * (not in pwd, as suggested by some older MS doc's).

  * Redefining these macros does not effect the CRT functions.

  */

  #define _P_tmpdir "\\"

  #ifndef __STRICT_ANSI__

  #define P_tmpdir _P_tmpdir

  #endif

  #define _wP_tmpdir L"\\"

  /*

  * The maximum size of name (including NUL) that will be put in the user

  * supplied buffer caName for tmpnam.

  * Inferred from the size of the static buffer returned by tmpnam

  * when passed a NULL argument. May actually be smaller.

  */

  #define L_tmpnam (16)

  #define _IOFBF 0x0000 /* full buffered */

  #define _IOLBF 0x0040 /* line buffered */

  #define _IONBF 0x0004 /* not buffered */

  #define _IOMYBUF 0x0008 /* stdio malloc()'d buffer */

  #define _IOEOF 0x0010 /* EOF reached on read */

  #define _IOERR 0x0020 /* I/O error from system */

  #define _IOSTRG 0x0040 /* Strange or no file descriptor */

  #ifdef _POSIX_SOURCE

  # define _IOAPPEND 0x0200

  #endif

  /*

  * The buffer size as used by setbuf such that it is equivalent to

  * (void) setvbuf(fileSetBuffer, caBuffer, _IOFBF, BUFSIZ).

  */

  #define BUFSIZ 512

  /* Constants for nOrigin indicating the position relative to which fseek

  * sets the file position. Enclosed in ifdefs because io.h could also

  * define them. (Though not anymore since io.h includes this file now.) */

  #ifndef SEEK_SET

  #define SEEK_SET (0)

  #endif

  #ifndef SEEK_CUR

  #define SEEK_CUR (1)

  #endif

  #ifndef SEEK_END

  #define SEEK_END (2)

  #endif

  #ifndef RC_INVOKED

  #ifndef __VALIST

  #ifdef __GNUC__

  #define __VALIST __gnuc_va_list

  #else

  #define __VALIST char*

  #endif

  #endif /* defined __VALIST */

  /*

  * The structure underlying the FILE type.

  *

  * Some believe that nobody in their right mind should make use of the

  * internals of this structure. Provided by Pedro A. Aranda Gutiirrez

  */

  #ifndef _FILE_DEFINED

  #define _FILE_DEFINED

结构体部分

  typedef struct _iobuf

  {

  char* _ptr;

  int _cnt;

  char* _base;

  int _flag;

  int _file;

  int _charbuf;

  int _bufsiz;

  char* _tmpfname;

  } FILE;

  #endif /* Not _FILE_DEFINED */

  /*

  * The standard file handles

  */

  #ifndef __DECLSPEC_SUPPORTED

  extern FILE (*_imp___iob)[]; /* A pointer to an array of FILE */

  #define _iob (*_imp___iob) /* An array of FILE */

  #else /* __DECLSPEC_SUPPORTED */

  __MINGW_IMPORT FILE _iob[]; /* An array of FILE imported from DLL. */

  #endif /* __DECLSPEC_SUPPORTED */

  #define stdin (&_iob[STDIN_FILENO])

  #define stdout (&_iob[STDOUT_FILENO])

  #define stderr (&_iob[STDERR_FILENO])

  #ifdef __cplusplus

  extern "C" {

  #endif

文件操作函数定义

  /*

  * File Operations

  */

  _CRTIMP FILE* __cdecl fopen (const char*, const char*);

  _CRTIMP FILE* __cdecl freopen (const char*, const char*, FILE*);

  _CRTIMP int __cdecl fflush (FILE*);

  _CRTIMP int __cdecl fclose (FILE*);

  /* MS puts remove & rename (but not wide versions) in io.h also */

  _CRTIMP int __cdecl remove (const char*);

  _CRTIMP int __cdecl rename (const char*, const char*);

  _CRTIMP FILE* __cdecl tmpfile (void);

  _CRTIMP char* __cdecl tmpnam (char*);

  #ifndef __STRICT_ANSI__

  _CRTIMP char* __cdecl _tempnam (const char*, const char*);

  _CRTIMP int __cdecl _rmtmp(void);

  #ifndef NO_OLDNAMES

  _CRTIMP char* __cdecl tempnam (const char*, const char*);

  _CRTIMP int __cdecl rmtmp(void);

  #endif

  #endif /* __STRICT_ANSI__ */

  _CRTIMP int __cdecl setvbuf (FILE*, char*, int, size_t);

  _CRTIMP void __cdecl setbuf (FILE*, char*);

格式化输出

  /*

  * Formatted Output

  */

  _CRTIMP int __cdecl fprintf (FILE*, const char*, ...);

  _CRTIMP int __cdecl printf (const char*, ...);

  _CRTIMP int __cdecl sprintf (char*, const char*, ...);

  _CRTIMP int __cdecl _snprintf (char*, size_t, const char*, ...);

  _CRTIMP int __cdecl vfprintf (FILE*, const char*, __VALIST);

  _CRTIMP int __cdecl vprintf (const char*, __VALIST);

  _CRTIMP int __cdecl vsprintf (char*, const char*, __VALIST);

  _CRTIMP int __cdecl _vsnprintf (char*, size_t, const char*, __VALIST);

  #ifndef __NO_ISOCEXT /* externs in libmingwex.a */

  int __cdecl snprintf(char* s, size_t n, const char* format, ...);

  __CRT_INLINE int __cdecl

  vsnprintf (char* s, size_t n, const char* format, __VALIST arg)

  { return _vsnprintf ( s, n, format, arg); }

  int __cdecl vscanf (const char * __restrict__, __VALIST);

  int __cdecl vfscanf (FILE * __restrict__, const char * __restrict__,

  __VALIST);

  int __cdecl vsscanf (const char * __restrict__,

  const char * __restrict__, __VALIST);

  #endif

  /*

  * Formatted Input

  */

  _CRTIMP int __cdecl fscanf (FILE*, const char*, ...);

  _CRTIMP int __cdecl scanf (const char*, ...);

  _CRTIMP int __cdecl sscanf (const char*, const char*, ...);

  /*

  * Character Input and Output Functions

  */

  _CRTIMP int __cdecl fgetc (FILE*);

  _CRTIMP char* __cdecl fgets (char*, int, FILE*);

  _CRTIMP int __cdecl fputc (int, FILE*);

  _CRTIMP int __cdecl fputs (const char*, FILE*);

  _CRTIMP char* __cdecl gets (char*);

  _CRTIMP int __cdecl puts (const char*);

  _CRTIMP int __cdecl ungetc (int, FILE*);

  /* Traditionally, getc and putc are defined as macros. but the

  standard doesn't say that they must be macros.

  We use inline functions here to allow the fast versions

  to be used in C++ with namespace qualification, eg., ::getc.

  _filbuf and _flsbuf are not thread-safe. */

  _CRTIMP int __cdecl _filbuf (FILE*);

  _CRTIMP int __cdecl _flsbuf (int, FILE*);

  #if !defined _MT

  __CRT_INLINE int __cdecl getc (FILE* __F)

  {

  return (--__F->_cnt >= 0)

  ? (int) (unsigned char) *__F->_ptr++

  : _filbuf (__F);

  }

  __CRT_INLINE int __cdecl putc (int __c, FILE* __F)

  {

  return (--__F->_cnt >= 0)

  ? (int) (unsigned char) (*__F->_ptr++ = (char)__c)

  : _flsbuf (__c, __F);

  }

  __CRT_INLINE int __cdecl getchar (void)

  {

  return (--stdin->_cnt >= 0)

  ? (int) (unsigned char) *stdin->_ptr++

  : _filbuf (stdin);

  }

  __CRT_INLINE int __cdecl putchar(int __c)

  {

  return (--stdout->_cnt >= 0)

  ? (int) (unsigned char) (*stdout->_ptr++ = (char)__c)

  : _flsbuf (__c, stdout);}

  #else /* Use library functions. */

  _CRTIMP int __cdecl getc (FILE*);

  _CRTIMP int __cdecl putc (int, FILE*);

  _CRTIMP int __cdecl getchar (void);

  _CRTIMP int __cdecl putchar (int);

  #endif

  /*

  * Direct Input and Output Functions

  */

  _CRTIMP size_t __cdecl fread (void*, size_t, size_t, FILE*);

  _CRTIMP size_t __cdecl fwrite (const void*, size_t, size_t, FILE*);

  /*

  * File Positioning Functions

  */

  _CRTIMP int __cdecl fseek (FILE*, long, int);

  _CRTIMP long __cdecl ftell (FILE*);

  _CRTIMP void __cdecl rewind (FILE*);

  #ifdef __USE_MINGW_FSEEK /* These are in libmingwex.a */

  /*

  * Workaround for limitations on win9x where a file contents are

  * not zero'd out if you seek past the end and then write.

  */

  int __cdecl __mingw_fseek (FILE *, long, int);

  int __cdecl __mingw_fwrite (const void*, size_t, size_t, FILE*);

  #define fseek(fp, offset, whence) __mingw_fseek(fp, offset, whence)

  #define fwrite(buffer, size, count, fp) __mingw_fwrite(buffer, size, count, fp)

  #endif /* __USE_MINGW_FSEEK */

  /*

  * An opaque data type used for storing file positions... The contents of

  * this type are unknown, but we (the compiler) need to know the size

  * because the programmer using fgetpos and fsetpos will be setting aside

  * storage for fpos_t structres. Actually I tested using a byte array and

  * it is fairly evident that the fpos_t type is a long (in CRTDLL.DLL).

  * Perhaps an unsigned long? TODO? It's definitely a 64-bit number in

  * MSVCRT however, and for now `long long' will do.

  */

  #ifdef __MSVCRT__

  typedef long long fpos_t;

  #else

  typedef long fpos_t;

  #endif

  _CRTIMP int __cdecl fgetpos (FILE*, fpos_t*);

  _CRTIMP int __cdecl fsetpos (FILE*, const fpos_t*);

  /*

  * Error Functions

  */

  _CRTIMP int __cdecl feof (FILE*);

  _CRTIMP int __cdecl ferror (FILE*);

  #ifdef __cplusplus

  inline int __cdecl feof (FILE* __F)

  { return __F->_flag & _IOEOF; }

  inline int __cdecl ferror (FILE* __F)

  { return __F->_flag & _IOERR; }

  #else

  #define feof(__F) ((__F)->_flag & _IOEOF)

  #define ferror(__F) ((__F)->_flag & _IOERR)

  #endif

  _CRTIMP void __cdecl clearerr (FILE*);

  _CRTIMP void __cdecl perror (const char*);

  #ifndef __STRICT_ANSI__

  /*

  * Pipes

  */

  _CRTIMP FILE* __cdecl _popen (const char*, const char*);

  _CRTIMP int __cdecl _pclose (FILE*);

  #ifndef NO_OLDNAMES

  _CRTIMP FILE* __cdecl popen (const char*, const char*);

  _CRTIMP int __cdecl pclose (FILE*);

  #endif

  /*

  * Other Non ANSI functions

  */

  _CRTIMP int __cdecl _flushall (void);

  _CRTIMP int __cdecl _fgetchar (void);

  _CRTIMP int __cdecl _fputchar (int);

  _CRTIMP FILE* __cdecl _fdopen (int, const char*);

  _CRTIMP int __cdecl _fileno (FILE*);

  _CRTIMP int __cdecl _fcloseall(void);

  _CRTIMP FILE* __cdecl _fsopen(const char*, const char*, int);

  #ifdef __MSVCRT__

  _CRTIMP int __cdecl _getmaxstdio(void);

  _CRTIMP int __cdecl _setmaxstdio(int);

  #endif

  #ifndef _NO_OLDNAMES

  _CRTIMP int __cdecl fgetchar (void);

  _CRTIMP int __cdecl fputchar (int);

  _CRTIMP FILE* __cdecl fdopen (int, const char*);

  _CRTIMP int __cdecl fileno (FILE*);

  #endif /* Not _NO_OLDNAMES */

  #define _fileno(__F) ((__F)->_file)

  #ifndef _NO_OLDNAMES

  #define fileno(__F) ((__F)->_file)

  #endif

  #if defined (__MSVCRT__) && !defined (__NO_MINGW_LFS)

  #include <sys/types.h>

  __CRT_INLINE FILE* __cdecl fopen64 (const char* filename, const char* mode)

  {

  return fopen (filename, mode);

  }

  int __cdecl fseeko64 (FILE*, off64_t, int);

  #ifdef __USE_MINGW_FSEEK

  int __cdecl __mingw_fseeko64 (FILE *, off64_t, int);

  #define fseeko64(fp, offset, whence) __mingw_fseeko64(fp, offset, whence)

  #endif

  __CRT_INLINE off64_t __cdecl ftello64 (FILE * stream)

  {

  fpos_t pos;

  if (fgetpos(stream, &pos))

  return -1LL;

  else

  return ((off64_t) pos);

  }

  #endif /* __NO_MINGW_LFS */

  #endif /* Not __STRICT_ANSI__ */

  /* Wide versions */

  #ifndef _WSTDIO_DEFINED

  /* also in wchar.h - keep in sync */

  _CRTIMP int __cdecl fwprintf (FILE*, const wchar_t*, ...);

  _CRTIMP int __cdecl wprintf (const wchar_t*, ...);

  _CRTIMP int __cdecl swprintf (wchar_t*, const wchar_t*, ...);

  _CRTIMP int __cdecl _snwprintf (wchar_t*, size_t, const wchar_t*, ...);

  _CRTIMP int __cdecl vfwprintf (FILE*, const wchar_t*, __VALIST);

  _CRTIMP int __cdecl vwprintf (const wchar_t*, __VALIST);

  _CRTIMP int __cdecl vswprintf (wchar_t*, const wchar_t*, __VALIST);

  _CRTIMP int __cdecl _vsnwprintf (wchar_t*, size_t, const wchar_t*, __VALIST);

  _CRTIMP int __cdecl fwscanf (FILE*, const wchar_t*, ...);

  _CRTIMP int __cdecl wscanf (const wchar_t*, ...);

  _CRTIMP int __cdecl swscanf (const wchar_t*, const wchar_t*, ...);

  _CRTIMP wint_t __cdecl fgetwc (FILE*);

  _CRTIMP wint_t __cdecl fputwc (wchar_t, FILE*);

  _CRTIMP wint_t __cdecl ungetwc (wchar_t, FILE*);

  #ifdef __MSVCRT__

  _CRTIMP wchar_t* __cdecl fgetws (wchar_t*, int, FILE*);

  _CRTIMP int __cdecl fputws (const wchar_t*, FILE*);

  _CRTIMP wint_t __cdecl getwc (FILE*);

  _CRTIMP wint_t __cdecl getwchar (void);

  _CRTIMP wchar_t* __cdecl _getws (wchar_t*);

  _CRTIMP wint_t __cdecl putwc (wint_t, FILE*);

  _CRTIMP int __cdecl _putws (const wchar_t*);

  _CRTIMP wint_t __cdecl putwchar (wint_t);

  _CRTIMP FILE* __cdecl _wfdopen(int, wchar_t *);

  _CRTIMP FILE* __cdecl _wfopen (const wchar_t*, const wchar_t*);

  _CRTIMP FILE* __cdecl _wfreopen (const wchar_t*, const wchar_t*, FILE*);

  _CRTIMP FILE* __cdecl _wfsopen (const wchar_t*, const wchar_t*, int);

  _CRTIMP wchar_t* __cdecl _wtmpnam (wchar_t*);

  _CRTIMP wchar_t* __cdecl _wtempnam (const wchar_t*, const wchar_t*);

  _CRTIMP int __cdecl _wrename (const wchar_t*, const wchar_t*);

  _CRTIMP int __cdecl _wremove (const wchar_t*);

  _CRTIMP void __cdecl _wperror (const wchar_t*);

  _CRTIMP FILE* __cdecl _wpopen (const wchar_t*, const wchar_t*);

  #endif /* __MSVCRT__ */

  #ifndef __NO_ISOCEXT /* externs in libmingwex.a */

  int __cdecl snwprintf (wchar_t* s, size_t n, const wchar_t* format, ...);

  __CRT_INLINE int __cdecl

  vsnwprintf (wchar_t* s, size_t n, const wchar_t* format, __VALIST arg)

  { return _vsnwprintf ( s, n, format, arg);}

  int __cdecl vwscanf (const wchar_t * __restrict__, __VALIST);

  int __cdecl vfwscanf (FILE * __restrict__,

  const wchar_t * __restrict__, __VALIST);

  int __cdecl vswscanf (const wchar_t * __restrict__,

  const wchar_t * __restrict__, __VALIST);

  #endif

  #define _WSTDIO_DEFINED

  #endif /* _WSTDIO_DEFINED */

  #ifndef __STRICT_ANSI__

  #ifdef __MSVCRT__

  #ifndef NO_OLDNAMES

  _CRTIMP FILE* __cdecl wpopen (const wchar_t*, const wchar_t*);

  #endif /* not NO_OLDNAMES */

  #endif /* MSVCRT runtime */

  /*

  * Other Non ANSI wide functions

  */

  _CRTIMP wint_t __cdecl _fgetwchar (void);

  _CRTIMP wint_t __cdecl _fputwchar (wint_t);

  _CRTIMP int __cdecl _getw (FILE*);

  _CRTIMP int __cdecl _putw (int, FILE*);

  #ifndef _NO_OLDNAMES

  _CRTIMP wint_t __cdecl fgetwchar (void);

  _CRTIMP wint_t __cdecl fputwchar (wint_t);

  _CRTIMP int __cdecl getw (FILE*);

  _CRTIMP int __cdecl putw (int, FILE*);

  #endif /* Not _NO_OLDNAMES */

  #endif /* __STRICT_ANSI */

  #ifdef __cplusplus

  }

  #endif

  #endif /* Not RC_INVOKED */

  #endif /* _STDIO_H_ */

分享到:
评论

相关推荐

    stdio.h 库函数下载

    我在编写"Hello World !"时,刚写第一行代码, IDE就...其实是因为stdio.h文件的缺失造成的,解决方法很简单:把stdio.h文件下载到”C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10150.0\ucrt\x64“路径下即可。

    stdio.h文件下载

    库函数stdio.h文件下载~………………

    关于在linux下出现stdio.h文件不存在问题的解决方法

    出现stdio.h文件找不到的问题,使用如下命令: root@chenxiaojian:/etc/apt# apt-get install libc6-dev 这个时候按道理能够成功解决,但是却出现如下错误: root@chenxiaojian:/etc/apt# apt-get install libc6-...

    #include

    #include &lt;stdio.h&gt; #include &lt;malloc.h&gt; struct DATA { int ID; char name[4]; char sex[3]; int score; }; void paixu(int*,DATA*,int); int sishewuru(double); void func1(int*,int*,DATA*,int*,int,...

    交叉编译环境的建立与测试

    #include &lt;stdio.h&gt; int main( ) { printf(“Hello,world!\n”); return 0; } 通过以下命令进行编译,编译后生成名为hello的可执行文件,通过file命令可以查看文件的类型。当显示以下信息时表明交叉工具链正常安装...

    SDK 找不到include xgpio.h解决办法

    在Xilinx SDK下开发MicroBlaze的C语言程序时,找不到xgpio.h,或者xgpio.h是叹号的解决办法

    C 标准库 – stdio.h

    stdio .h 头文件定义了三个变量类型、一些宏和各种函数来执行输入和输出。 库变量 下面是头文件 stdio.h 中定义的变量类型: 序号 变量 & 描述 1 size_t 这是无符号整数类型,它是 sizeof 关键字的结果。 2 ...

    解决VS2017不能打开stdio.h等文件的问题

    下面小编就为大家带来一篇解决VS2017不能打开stdio.h等文件的问题。小编觉得挺不错的,现在就分享给大家,也给大家做个参考。一起跟随小编过来看看吧

    记录C语言学习中的代码.rar

      它的作用是把stdio.h文件的所有内容都输入该行所在位置。换句话说,结果就是把stdio.h所有内容复制粘贴过来。 #include叫做c预处理指令(preprocessor dierctive)也叫文件包含命令,用来引入对应的头文件(.h...

    VS2005编译 提示无法打开包括头文件“stdint.h“

    由于代码中使用了头文件&lt;stdint.h&gt; 但是VS2005缺少头文件stdint.h,所以在"VS2005安装路径/VC/include"(例:C:\softwore\VS2005\VC\include)路径下添加stdint.h文件即可。

    VS编译时无法打开 源 文件 "pthread.h处理方法

    VS编译时无法打开 源 文件 "pthread.h"。是因为微软VS没有pthread.h. 项目--属性--配置属性--c/c++常规--附加包含目录添加pthread.h所在的文件夹。

    C_函数(标注版).pdf相关函数 signal,sleep 表头文件 #include<unistd.h> 定义函数 unsigned int alarm(unsigned int seconds);

    表头文件 #include&lt;unistd.h&gt; 定义函数 unsigned int alarm(unsigned int seconds); 函数说明 alarm()用来设置信号SIGALRM在经过参数seconds指定的秒数后传送给目前的进程。如果参数 seconds 为0,则之前设置的闹钟...

    vscode配置c/c++环境文件

    vscode配置c/c++环境文件

    MEM.H头文件

    用来实现一些常用的功能,这些函数库被称为库函数,他们其实也是一些程序文件,不过,在使用之前一定要要用的函数的库函数包含进来,这样才能使用其中的库函数,常用的库函数,例如,stdio.h mem.h,这个库函数中的函数主要是...

    csapp_深入理解计算机系统_相关文件_csapp.h_csapp.c

    #include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; #include &lt;unistd.h&gt; #include &lt;string.h&gt; #include &lt;ctype.h&gt; #include &lt;setjmp.h&gt; #include &lt;signal.h&gt; #include &lt;sys/time.h&gt; #include &lt;sys/types.h&gt; #include ...

    c语言文件读写操作代码.txt

    #include &lt;stdio.h&gt; int main() { FILE *file; file = fopen("filename.txt", "r"); // 打开文件以读取 if (file == NULL) { printf("无法打开文件\n"); return 1; } // 在这里进行文件读取...

    linux头文件介绍

    &lt;fcntl.h &gt; 文件控制 &lt;float.h &gt; 浮点常数 &lt;signal.h &gt; 信号 &lt;stdarg.h &gt; 可变参数表 &lt;stddef.h &gt; 标准定义 &lt;stdio.h &gt; 标准I/O库 &lt;stdlib.h &gt; 公用函数 &lt;string.h &gt; 字符串操作 ......

    C标准库文档,包括标准库中12个头文件的描述

    cstdlib 的描述文档 * &lt;assert.h&gt; : Diagnostics ... * &lt;stdio.h&gt; : Input and Output * &lt;stdlib.h&gt; : Utility functions * &lt;string.h&gt; : String functions * &lt;time.h&gt; : Time and Date functions

    jni简单使用

    生成HelloWorld.h文件(若提示找不到HelloWorld类文件,Java代码中不要写package) 有package时,在包所在目录下打开终端,输入命令javah -jni com.gjl.jnitest.HelloWorld (com.gjl.jnitest为包名) 生成 ...

    Windows Sockets 2 编程手册 11/26/2021 Page 1798

    含有如下h文件的所有API接口. af_irda.h in6addr.h mstcpip.h mswsock.h mswsockdef.h nsemail.h nspapi.h socketapi.h sporder.h transportsettingcommon.h winsock.h ws2atm.h ws2spi.h ws2tcpip.h wsipv6ok.h ...

Global site tag (gtag.js) - Google Analytics