Espaces de noms
Variantes
Affichages
Actions

std::vscanf, std::vfscanf, std::vsscanf

De cppreference.com
< cpp‎ | io‎ | c

 
 
D'entrée / sortie de bibliothèque
I / O manipulateurs
C-style I / O
Tampons
Original:
Buffers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_streambuf
basic_filebuf
basic_stringbuf
strstreambuf (obsolète)
Cours d'eau
Original:
Streams
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Abstractions
Original:
Abstractions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ios_base
basic_ios
basic_istream
basic_ostream
basic_iostream
Fichier E / O
Original:
File I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_ifstream
basic_ofstream
basic_fstream
Chaîne I / O
Original:
String I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_istringstream
basic_ostringstream
basic_stringstream
Tableau I / O
Original:
Array I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
istrstream (obsolète)
ostrstream (obsolète)
strstream (obsolète)
Types
Original:
Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
streamoff
streamsize
fpos
Interface catégorie d'erreur
Original:
Error category interface
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
iostream_category (C++11)
io_errc (C++11)
 
C-style I / O
Fonctions
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Déposer accès
Original:
File access
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Entrée / sortie directe
Original:
Direct input/output
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
fread
fwrite
Entrée non formatée / sortie
Original:
Unformatted input/output
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Mise en forme d'entrée / sortie
Original:
Formatted input/output
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
scanf
fscanf
sscanf
vscanf
vfscanf
vsscanf
(C++11)
(C++11)
(C++11)
printf
fprintf
sprintf
snprintf



(C++11)
vprintf
vfprintf
vsprintf
vsnprintf



(C++11)
Fichier de positionnement
Original:
File positioning
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ftell
fgetpos
fseek
fsetpos
rewind
Erreur de manipulation
Original:
Error handling
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
clearerr
feof
ferror
perror
Les opérations sur les fichiers
Original:
Operations on files
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
remove
rename
tmpfile
tmpnam
 
Defined in header <cstdio>
int vscanf( const char *format, va_list vlist );
(1) (depuis C++11)
int vfscanf( FILE *stream, const char *format, va_list vlist );
(2) (depuis C++11)
int vsscanf( const char *buffer, const char *format, va_list vlist );
(3) (depuis C++11)
Lit les données de la variété de sources, il interprète selon format et stocke les résultats dans des emplacements définis par vlist .
Original:
Reads data from the a variety of sources, interprets it according to format and stores the results into locations defined by vlist.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
1)
Lit les données stdin .
Original:
Reads the data from stdin.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
2)
Lit les données de flux stream fichier .
Original:
Reads the data from file stream stream.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
3)
Lit les données à zéro terminal buffer chaîne de caractères .
Original:
Reads the data from null-terminated character string buffer.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Sommaire

[modifier] Paramètres

stream -
flux de fichier d'entrée à lire
Original:
input file stream to read from
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
buffer -
pointeur vers une chaîne de caractères terminée par NULL à lire
Original:
pointer to a null-terminated character string to read from
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
format -
pointeur vers une chaîne de caractères terminée par NULL spécifiant la façon de lire l'entrée.
La chaîne de format est constitué de caractères blancs (un seul caractère blanc dans la chaîne de format consomme tous les caractères d'espacement consécutifs disponibles à partir de l'entrée), ni blancs, sauf % (chaque caractère comme dans les chaînes de format consomme exactement un caractère identique de l'entrée) spécifications de conversion et. Chaque spécification de conversion a le format suivant:
Original:
The format string consists of whitespace characters (any single whitespace character in the format string consumes all available consecutive whitespace characters from the input), non-whitespace characters except % (each such character in the format strings consumes exactly one identical character from the input) and conversion specifications. Each conversion specification has the following format:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • % caractère introductif
    Original:
    introductory % character
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • (en option) affectation-suppression * caractère. Si cette option est présente, la fonction n'affecte pas le résultat de la conversion à tout argument recevoir .
    Original:
    (en option) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • (en option) entier nombre (supérieur à zéro) qui spécifie' largeur de champ maximale, qui est le nombre maximum de caractères que la fonction est autorisé à consommer lorsque vous faites la conversion spécifié par la spécification de conversion courant. Notez que [% s et% peut conduire à des dépassements de tampon si la largeur n'est pas fourni .
    Original:
    (en option) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • (en option)' modificateur de longueur qui spécifie la taille de l'argument de réception, qui est, le type de destination réelle. Cela affecte la précision de la conversion et des règles de débordement. Le type de destination par défaut est différente pour chaque type de conversion (voir tableau ci-dessous) .
    Original:
    (en option) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below).
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • le format spécificateur de conversion
    Original:
    conversion format specifier
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
Les spécificateurs de format suivants sont disponibles:
Original:
The following format specifiers are available:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Conversion
specifier
Explanation Argument type
length modifier hh h (none) l ll j z t L
% matches literal % N/A N/A N/A N/A N/A N/A N/A N/A N/A
c matches a single character N/A N/A
char*
wchar_t*
N/A N/A N/A N/A N/A
s matches a character string (a sequence of non-whitespace characters)
[set]
correspond à une séquence non vide de caractère de set de caractères .
Original:
matches a non-empty sequence of character from set of characters.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Si le premier caractère de la série est ^, puis tous les caractères dans le jeu ne sont appariées. Si le jeu commence avec ] ou ^] alors le caractère ] est également inclus dans l'ensemble .
Original:
If the first character of the set is ^, then all characters not in the set are matched. If the set begins with ] or ^] then the ] character is also included into the set.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
d
correspond à entier décimal' un .
Original:
matches a decimal integer'.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Le format du numéro est le même que prévu par strtol() avec le 10 valeur pour l'argument base
Original:
The format of the number is the same as expected by strtol() with the value 10 for the base argument
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
signed char* or unsigned char*
signed short* or unsigned short*
signed int* or unsigned int*
signed long* or unsigned long*
signed long long* or unsigned long long*
intmax_t* or uintmax_t*
size_t*
ptrdiff_t*
N/A
i
correspond à entier décimal' un .
Original:
matches a decimal integer'.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Le format du numéro est le même que prévu par strtol() avec le 0 valeur pour l'argument base
Original:
The format of the number is the same as expected by strtol() with the value 0 for the base argument
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
u
correspond à une entier décimal non signé' .
Original:
matches a unsigned decimal integer'.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Le format du numéro est le même que prévu par strtoul() avec le 0 valeur pour l'argument base
Original:
The format of the number is the same as expected by strtoul() with the value 0 for the base argument
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
o
correspond à une 'entier octal' .
Original:
matches an octal integer.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Le format du numéro est le même que prévu par strtol() avec le 8 valeur pour l'argument base
Original:
The format of the number is the same as expected by strtol() with the value 8 for the base argument
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
x
correspond à entier hexadécimal' un .
Original:
matches an hexadecimal integer'.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Le format du numéro est le même que prévu par strtol() avec le 16 valeur pour l'argument base
Original:
The format of the number is the same as expected by strtol() with the value 16 for the base argument
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
n
renvoie 'nombre de caractères lu jusqu'ici' le .
Original:
returns the number of characters read so far.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Aucune entrée n'est consommé. Ne pas incrémenter le compteur d'assignations. Si le spécificateur doit affectation-suppression défini par l'opérateur, le comportement est indéfini
Original:
No input is consumed. Does not increment the assignment count. If the specifier has assignment-suppressing operator defined, the behavior is undefined
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
a, A
e, E
f, F
g, G
correspond à une 'nombre à virgule flottante' .
Original:
matches a floating-point number.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Le format du numéro est le même que prévu par strtof()
Original:
The format of the number is the same as expected by strtof()
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
N/A N/A
float*
double*
N/A N/A N/A N/A
long double*
p
correspond séquence de caractères défini par l'implémentation de définir un 'pointeur' .
Original:
matches implementation defined character sequence defining a pointer.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
printf famille de fonctions devrait produire la même séquence en utilisant spécificateur de format %p
Original:
printf family of functions should produce the same sequence using %p format specifier
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
N/A N/A
void**
N/A N/A N/A N/A N/A N/A
Original:
pointer to a null-terminated character string specifying how to read the input.
La chaîne de format est constitué de caractères blancs (un seul caractère blanc dans la chaîne de format consomme tous les caractères d'espacement consécutifs disponibles à partir de l'entrée), ni blancs, sauf % (chaque caractère comme dans les chaînes de format consomme exactement un caractère identique de l'entrée) spécifications de conversion et. Chaque spécification de conversion a le format suivant:
Original:
The format string consists of whitespace characters (any single whitespace character in the format string consumes all available consecutive whitespace characters from the input), non-whitespace characters except % (each such character in the format strings consumes exactly one identical character from the input) and conversion specifications. Each conversion specification has the following format:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • % caractère introductif
    Original:
    introductory % character
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • (en option) affectation-suppression * caractère. Si cette option est présente, la fonction n'affecte pas le résultat de la conversion à tout argument recevoir .
    Original:
    (en option) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • (en option) entier nombre (supérieur à zéro) qui spécifie' largeur de champ maximale, qui est le nombre maximum de caractères que la fonction est autorisé à consommer lorsque vous faites la conversion spécifié par la spécification de conversion courant. Notez que [% s et% peut conduire à des dépassements de tampon si la largeur n'est pas fourni .
    Original:
    (en option) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • (en option)' modificateur de longueur qui spécifie la taille de l'argument de réception, qui est, le type de destination réelle. Cela affecte la précision de la conversion et des règles de débordement. Le type de destination par défaut est différente pour chaque type de conversion (voir tableau ci-dessous) .
    Original:
    (en option) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below).
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • le format spécificateur de conversion
    Original:
    conversion format specifier
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
Les spécificateurs de format suivants sont disponibles:
Original:
The following format specifiers are available:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Conversion
specifier
Explanation Argument type
length modifier hh h (none) l ll j z t L
% matches literal % N/A N/A N/A N/A N/A N/A N/A N/A N/A
c matches a single character N/A N/A
char*
wchar_t*
N/A N/A N/A N/A N/A
s matches a character string (a sequence of non-whitespace characters)
[set]
correspond à une séquence non vide de caractère de set de caractères .
Original:
matches a non-empty sequence of character from set of characters.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Si le premier caractère de la série est ^, puis tous les caractères dans le jeu ne sont appariées. Si le jeu commence avec ] ou ^] alors le caractère ] est également inclus dans l'ensemble .
Original:
If the first character of the set is ^, then all characters not in the set are matched. If the set begins with ] or ^] then the ] character is also included into the set.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
d
correspond à entier décimal' un .
Original:
matches a decimal integer'.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Le format du numéro est le même que prévu par strtol() avec le 10 valeur pour l'argument base
Original:
The format of the number is the same as expected by strtol() with the value 10 for the base argument
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
signed char* or unsigned char*
signed short* or unsigned short*
signed int* or unsigned int*
signed long* or unsigned long*
signed long long* or unsigned long long*
intmax_t* or uintmax_t*
size_t*
ptrdiff_t*
N/A
i
correspond à entier décimal' un .
Original:
matches a decimal integer'.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Le format du numéro est le même que prévu par strtol() avec le 0 valeur pour l'argument base
Original:
The format of the number is the same as expected by strtol() with the value 0 for the base argument
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
u
correspond à une entier décimal non signé' .
Original:
matches a unsigned decimal integer'.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Le format du numéro est le même que prévu par strtoul() avec le 0 valeur pour l'argument base
Original:
The format of the number is the same as expected by strtoul() with the value 0 for the base argument
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
o
correspond à une 'entier octal' .
Original:
matches an octal integer.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Le format du numéro est le même que prévu par strtol() avec le 8 valeur pour l'argument base
Original:
The format of the number is the same as expected by strtol() with the value 8 for the base argument
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
x
correspond à entier hexadécimal' un .
Original:
matches an hexadecimal integer'.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Le format du numéro est le même que prévu par strtol() avec le 16 valeur pour l'argument base
Original:
The format of the number is the same as expected by strtol() with the value 16 for the base argument
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
n
renvoie 'nombre de caractères lu jusqu'ici' le .
Original:
returns the number of characters read so far.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Aucune entrée n'est consommé. Ne pas incrémenter le compteur d'assignations. Si le spécificateur doit affectation-suppression défini par l'opérateur, le comportement est indéfini
Original:
No input is consumed. Does not increment the assignment count. If the specifier has assignment-suppressing operator defined, the behavior is undefined
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
a, A
e, E
f, F
g, G
correspond à une 'nombre à virgule flottante' .
Original:
matches a floating-point number.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Le format du numéro est le même que prévu par strtof()
Original:
The format of the number is the same as expected by strtof()
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
N/A N/A
float*
double*
N/A N/A N/A N/A
long double*
p
correspond séquence de caractères défini par l'implémentation de définir un 'pointeur' .
Original:
matches implementation defined character sequence defining a pointer.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
printf famille de fonctions devrait produire la même séquence en utilisant spécificateur de format %p
Original:
printf family of functions should produce the same sequence using %p format specifier
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
N/A N/A
void**
N/A N/A N/A N/A N/A N/A
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
vlist -
liste d'arguments variable contenant les arguments de réception
Original:
variable argument list containing the receiving arguments
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[modifier] Retourne la valeur

Nombre d'arguments avec succès lire ou EOF en cas d'échec .
Original:
Number of arguments successfully read, or EOF if failure occurs.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[modifier] Exemple

[modifier] Voir aussi

lit l'entrée en forme à partir stdin, un flux de fichier ou un tampon
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.

(fonction) [edit]
impressions formaté à stdout, un flux ou un fichier en utilisant buffer
liste d'arguments 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.

(fonction) [edit]
C documentation for vscanf, vfscanf, vsscanf