⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fr

📁 Algorithms for Image Processing and Computer Vision Source Code
💻
字号:
@c ----------------------------------------------------------------------
@node fread, stdio
@heading @code{fread}
@subheading Syntax

@example
#include <stdio.h>

size_t fread(void *buffer, size_t size, size_t number, FILE *file);
@end example

@subheading Description

This function reads @var{size}*@var{number} characters from @var{file}
to @var{buffer}. 

@subheading Return Value

The number of items of size @var{size} read, or -1 on error.

@subheading Example

@example
int foo[10];
fread(foo, sizeof(int), 10, stdin);
@end example

@c ----------------------------------------------------------------------
@node free, memory
@heading @code{free}
@subheading Syntax

@example
#include <stdio.h>

void free(void *ptr);
@end example

@subheading Description

Returns the allocated memory to the heap (@pxref{malloc}).  If the
@var{ptr} is @code{NULL}, it does nothing. 

@subheading Return Value

None.

@subheading Example

@example
char *q = (char *)malloc(20);
free(q);
@end example

@c ----------------------------------------------------------------------
@node freopen, stdio
@heading @code{freopen}
@subheading Syntax

@example
#include <stdio.h>

FILE *freopen(const char *filename, const char *mode, FILE *file);
@end example

@subheading Description

This function closes @var{file} if it was open, then opens a new
file like @code{fopen(filename, mode)} but it reuses @var{file}.

This is useful to, for example, associate @code{stdout} with a new file. 

@subheading Return Value

The new file, or @code{NULL} on error. 

@subheading Example

@example
freopen("/tmp/stdout.dat", "wb", stdout);
@end example

⌨️ 快捷键说明

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