Espacios de nombres
Variantes
Acciones

Archivo de encabezado de la biblioteca estándar <cstdio>

De cppreference.com
< cpp‎ | header
 
 
Archivos de encabezado de la biblioteca estándar
 

Este archivo de encabezado se encontraba originalmente en la biblioteca estándar de C como <stdio.h>.

Este encabezado es parte de la biblioteca de entrada/salida estilo C.

Contenido

Tipos

Tipo objeto capaz de contener toda la información necesaria para controlar un flujo de E/S de C.
(typedef)[editar]
Tipo objeto completo que no es un array, capaz de especificar de forma única una posición en un archivo, incluido su estado de análisis multibyte.
(typedef)[editar]
Tipo entero sin signo devuelto por el operador sizeof.
(typedef)[editar]

Macros

Constante de puntero nulo definido por la implementación.
(constante de macro)[editar]
Expresión de tipo FILE* asociada con el flujo de entrada.
Expresión de tipo FILE* asociada con el flujo de salida.
Expresión de tipo FILE* asociada con el flujo de error.
(constante de macro)[editar]
EOF
Expresión constante entera de tipo int y valor negativo.
(constante de macro)
FOPEN_MAX
Número de archivos que se pueden abrir simultáneamente.
(constante de macro)
FILENAME_MAX
Tamaño necesario para que un array de char contenga el nombre de archivo compatible más largo.
(constante de macro)
BUFSIZ
Tamaño del búfer utilizado por std::setbuf.
(constante de macro)
_IOFBF_IOLBF_IONBF
Argumento de std::setbuf que indica E/S con búfer completo.
argumento de std::setbuf que indica E/S almacenada en búfer de línea.
argumento de std::setbuf que indica E/S sin búfer.
(constante de macro)
SEEK_SETSEEK_CURSEEK_END
Argumento de std::fseek que indica búsqueda desde el principio del archivo.
Argumento de std::fseek que indica búsqueda desde la posición actual del archivo.
Argumento de std::fseek que indica búsqueda desde el final del archivo.
(constante de macro)
TMP_MAX
Número máximo de nombres de archivo únicos que se pueden generar con std::tmpnam.
(constante de macro)
L_tmpnam
Tamaño necesario para que un array de char contenga el resultado de std::tmpnam.
(constante de macro)

Funciones

File access
se abre un archivo
Original:
opens a file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función)[editar]
abrir una secuencia existente con un nombre diferente
Original:
open an existing stream with a different name
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función)[editar]
cierra un archivo
Original:
closes a file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función)[editar]
sincroniza un flujo de salida con el archivo real
Original:
synchronizes an output stream with the actual file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función)[editar]
establece el tampón para una secuencia de archivo
Original:
sets the buffer for a file stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función)[editar]
establece el tampón y su tamaño para una secuencia de archivo
Original:
sets the buffer and its size for a file stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función)[editar]
E/S directa
lee un archivo
Original:
reads from a file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función)[editar]
escribe en un archivo
Original:
writes to a file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función)[editar]
E/S sin formato
Carácter estrecho
recibe un carácter de una secuencia de archivo
Original:
gets a character from a file stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función)[editar]
recibe una cadena de caracteres a partir de una secuencia de archivo
Original:
gets a character string from a file stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función)[editar]
Escribe un carácter en una secuencia de archivo
Original:
writes a character to a file stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función)[editar]
escribe una cadena de caracteres en una secuencia de archivo
Original:
writes a character string to a file stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función)[editar]
dice un personaje de stdin
Original:
reads a character from stdin
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función)[editar]
lee una cadena de caracteres de stdin
Original:
reads a character string from stdin
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función)[editar]
escribe un carácter a stdout
Original:
writes a character to stdout
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función)[editar]
escribe una cadena de caracteres a stdout
Original:
writes a character string to stdout
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función)[editar]
pone un personaje nuevo en una secuencia de archivo
Original:
puts a character back into a file stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función)[editar]
E/S con formato
Narrow/multibyte character
lee la entrada con formato desde stdin, una secuencia de archivo o un tampón
Original:
reads formatted input from stdin, a file stream or a buffer
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función)[editar]
(C++11)(C++11)(C++11)
lee la entrada con formato de stdin, una secuencia de archivo o una buffer
con lista de argumentos variable
Original:
reads formatted input from stdin, a file stream or a buffer
using variable argument list
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función)[editar]
Imprime la salida formateada para stdout, una secuencia de archivo o un búfer.
(función)[editar]
imprime el formato de salida a stdout, una secuencia de archivo o una buffer
con lista de argumentos variable
Original:
prints formatted output to stdout, a file stream or a buffer
using variable argument list
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función)[editar]
Posicionamiento de archivo
devuelve el indicador de archivo posición actual
Original:
returns the current file position indicator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función)[editar]
obtiene el indicador de posición del archivo
Original:
gets the file position indicator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función)[editar]
desplaza el indicador de posición de archivo a una ubicación específica en un archivo
Original:
moves the file position indicator to a specific location in a file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función)[editar]
desplaza el indicador de posición de archivo a una ubicación específica en un archivo
Original:
moves the file position indicator to a specific location in a file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función)[editar]
mueve el indicador de posición de archivo al principio en un archivo
Original:
moves the file position indicator to the beginning in a file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función)[editar]
Manejo de errores
borra los errores
Original:
clears errors
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función)[editar]
cheques para el final de archivo
Original:
checks for the end-of-file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función)[editar]
comprueba si hay un error de archivo
Original:
checks for a file error
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función)[editar]
muestra una cadena de caracteres correspondiente del error actual a stderr
Original:
displays a character string corresponding of the current error to stderr
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función)[editar]
Operaciones sobre archivos
borra un archivo
Original:
erases a file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función)[editar]
cambia el nombre de un archivo
Original:
renames a file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función)[editar]
crea y abre un temporal, auto-eliminación de archivos
Original:
creates and opens a temporary, auto-removing file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función)[editar]
devuelve un nombre de archivo único
Original:
returns a unique filename
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función)[editar]

[editar]Sinopsis

namespace std {using size_t =/* véase descripción */;using FILE =/* véase descripción */;using fpos_t =/* véase descripción */;}   #define NULL /* véase descripción */#define _IOFBF /* véase descripción */#define _IOLBF /* véase descripción */#define _IONBF /* véase descripción */#define BUFSIZ /* véase descripción */#define EOF /* véase descripción */#define FOPEN_MAX /* véase descripción */#define FILENAME_MAX /* véase descripción */#define L_tmpnam /* véase descripción */#define SEEK_CUR /* véase descripción */#define SEEK_END /* véase descripción */#define SEEK_SET /* véase descripción */#define TMP_MAX /* véase descripción */#define stderr /* véase descripción */#define stdin /* véase descripción */#define stdout /* véase descripción */   namespace std {int remove(constchar* filename);int rename(constchar* old_p, constchar* new_p); FILE* tmpfile();char* tmpnam(char* s);int fclose(FILE* stream);int fflush(FILE* stream); FILE* fopen(constchar* filename, constchar* mode); FILE* freopen(constchar* filename, constchar* mode, FILE* stream);void setbuf(FILE* stream, char* buf);int setvbuf(FILE* stream, char* buf, int mode, size_t size);int fprintf(FILE* stream, constchar* format, ...);int fscanf(FILE* stream, constchar* format, ...);int printf(constchar* format, ...);int scanf(constchar* format, ...);int snprintf(char* s, size_t n, constchar* format, ...);int sprintf(char* s, constchar* format, ...);int sscanf(constchar* s, constchar* format, ...);int vfprintf(FILE* stream, constchar* format, va_list arg);int vfscanf(FILE* stream, constchar* format, va_list arg);int vprintf(constchar* format, va_list arg);int vscanf(constchar* format, va_list arg);int vsnprintf(char* s, size_t n, constchar* format, va_list arg);int vsprintf(char* s, constchar* format, va_list arg);int vsscanf(constchar* s, constchar* format, va_list arg);int fgetc(FILE* stream);char* fgets(char* s, int n, FILE* stream);int fputc(int c, FILE* stream);int fputs(constchar* s, FILE* stream);int getc(FILE* stream);int getchar();int putc(int c, FILE* stream);int putchar(int c);int puts(constchar* s);int ungetc(int c, FILE* stream); size_t fread(void* ptr, size_t size, size_t nmemb, FILE* stream); size_t fwrite(constvoid* ptr, size_t size, size_t nmemb, FILE* stream);int fgetpos(FILE* stream, fpos_t* pos);int fseek(FILE* stream, longint offset, int whence);int fsetpos(FILE* stream, const fpos_t* pos);longint ftell(FILE* stream);void rewind(FILE* stream);void clearerr(FILE* stream);int feof(FILE* stream);int ferror(FILE* stream);void perror(constchar* s);}

[editar]Notas

close