Standard library header <cstdio>
      From cppreference.net
     
     
     Cet en-tête était à l'origine dans la bibliothèque standard C sous le nom de <stdio.h> .
Cet en-tête fait partie de la bibliothèque d'entrée/sortie de style C .
         
 Types | 
       ||
| 
         type d'objet, capable de contenir toutes les informations nécessaires pour contrôler un flux d'E/S C
          (typedef)  | 
       ||
| 
         type d'objet non-tableau complet, capable de spécifier de manière unique une position dans un fichier, y compris son état d'analyse multioctet
          (typedef)  | 
       ||
| 
         type entier non signé renvoyé par l'opérateur
         
          
           sizeof
          
         
          (typedef)  | 
       ||
         Macros | 
       ||
| 
         constante de pointeur nul définie par l'implémentation
          (constante macro)  | 
       ||
| 
         expression de type
         
          FILE
          
           *
          
         
         associée au flux d'entrée
          expression de type FILE * associée au flux de sortie expression de type FILE * associée au flux de sortie d'erreur (constante macro)  | 
       ||
| 
          
           
            
             EOF
            
           
           
          | 
        
         expression constante entière de type
         
          
           int
          
         
         et de valeur négative
          (constante macro)  | 
       |
| 
          
           
            
             FOPEN_MAX
            
           
           
          | 
        
         nombre de fichiers pouvant être ouverts simultanément
          (constante macro)  | 
       |
| 
          
           
            
             FILENAME_MAX
            
           
           
          | 
        
         taille nécessaire pour un tableau de
         
          
           char
          
         
         pour contenir le nom de fichier le plus long pris en charge
          (constante macro)  | 
       |
| 
          
           
            
             BUFSIZ
            
           
           
          | 
        
         taille du tampon utilisé par
         
          
           std::setbuf
          
         
          (constante macro)  | 
       |
| 
          
           
            
             _IOFBF
            
            
             _IOLBF
            
            
             _IONBF
            
           
           
          | 
        
         argument pour
         
          
           std::setbuf
          
         
         indiquant une E/S entièrement tamponnée
          argument pour std::setbuf indiquant une E/S tamponnée par ligne argument pour std::setbuf indiquant une E/S non tamponnée (constante macro)  | 
       |
| 
          
           
            
             SEEK_SET
            
            
             SEEK_CUR
            
            
             SEEK_END
            
           
           
          | 
        
         argument pour
         
          
           std::fseek
          
         
         indiquant un positionnement depuis le début du fichier
          argument pour std::fseek indiquant un positionnement depuis la position courante du fichier argument pour std::fseek indiquant un positionnement depuis la fin du fichier (constante macro)  | 
       |
| 
          
           
            
             TMP_MAX
            
           
           
          | 
        
         nombre maximum de noms de fichiers uniques pouvant être générés par
         
          
           std::tmpnam
          
         
          (constante macro)  | 
       |
| 
          
           
            
             L_tmpnam
            
           
           
          | 
        
         taille nécessaire pour un tableau de
         
          
           char
          
         
         pour contenir le résultat de
         
          
           std::tmpnam
          
         
          (constante macro)  | 
       |
         Fonctions | 
       ||
         Accès aux fichiers | 
       ||
| 
         ouvre un fichier
          (fonction)  | 
       ||
| 
         ouvrir un flux existant avec un nom différent
          (fonction)  | 
       ||
| 
         ferme un fichier
          (fonction)  | 
       ||
| 
         synchronise un flux de sortie avec le fichier réel
          (fonction)  | 
       ||
| 
         définit le tampon pour un flux de fichier
          (fonction)  | 
       ||
| 
         définit le tampon et sa taille pour un flux de fichier
          (fonction)  | 
       ||
         Entrée/sortie directe | 
       ||
| 
         lit à partir d'un fichier
          (fonction)  | 
       ||
| 
         écrit dans un fichier
          (fonction)  | 
       ||
         Entrée/sortie non formatée | 
       ||
         Caractère étroit | 
       ||
| 
         obtient un caractère d'un flux de fichier
          (fonction)  | 
       ||
| 
         obtient une chaîne de caractères depuis un flux de fichier
          (fonction)  | 
       ||
| 
         écrit un caractère dans un flux de fichier
          (fonction)  | 
       ||
| 
         écrit une chaîne de caractères dans un flux de fichier
          (fonction)  | 
       ||
| 
         lit un caractère depuis
         
          
           stdin
          
         
          (fonction)  | 
       ||
| 
          
           
            
             
              (déprécié en C++11)
             
            
            
             
              (supprimé en C++14)
             
            
           
           
          | 
        
         lit une chaîne de caractères depuis
         
          
           stdin
          
         
          (fonction)  | 
       |
| 
         écrit un caractère vers
         
          
           stdout
          
         
          (fonction)  | 
       ||
| 
         écrit une chaîne de caractères vers
         
          
           stdout
          
         
          (fonction)  | 
       ||
| 
         replace un caractère dans un flux de fichier
          (fonction)  | 
       ||
         Entrée/sortie formatée | 
       ||
         Caractère étroit/multioctet | 
       ||
| 
         lit une entrée formatée depuis
         
          
           stdin
          
         
         , un flux de fichier ou un tampon
          (fonction)  | 
       ||
| 
          
           
            
             
              (C++11)
             
            
            
             
              (C++11)
             
            
            
             
              
               
                (C++11)
               
              
             
            
           
           
          | 
        
         lit une entrée formatée depuis
         
          
           stdin
          
         
         , un flux de fichier ou un tampon
          en utilisant une liste d'arguments variables (fonction)  | 
       |
| 
          
           
            
            
            
            
            
            
            
             
              (C++11)
             
            
           
           
          | 
        
         imprime une sortie formatée vers
         
          
           stdout
          
         
         , un flux de fichier ou un tampon
          (fonction)  | 
       |
| 
         imprime une sortie formatée vers
         
          
           stdout
          
         
         , un flux de fichier ou un tampon
          en utilisant une liste d'arguments variable (fonction)  | 
       ||
         Positionnement du fichier | 
       ||
| 
         renvoie l'indicateur de position actuel du fichier
          (fonction)  | 
       ||
| 
         obtient l'indicateur de position du fichier
          (fonction)  | 
       ||
| 
         déplace l'indicateur de position du fichier vers un emplacement spécifique dans un fichier
          (fonction)  | 
       ||
| 
         déplace l'indicateur de position du fichier vers un emplacement spécifique dans un fichier
          (fonction)  | 
       ||
| 
         déplace l'indicateur de position du fichier au début d'un fichier
          (fonction)  | 
       ||
         Gestion des erreurs | 
       ||
| 
         efface les erreurs
          (fonction)  | 
       ||
| 
         vérifie la fin de fichier
          (fonction)  | 
       ||
| 
         vérifie une erreur de fichier
          (fonction)  | 
       ||
| 
         affiche une chaîne de caractères correspondant à l'erreur courante vers
         
          
           stderr
          
         
          (fonction)  | 
       ||
         Opérations sur les fichiers | 
       ||
| 
         supprime un fichier
          (fonction)  | 
       ||
| 
         renomme un fichier
          (fonction)  | 
       ||
| 
         crée et ouvre un fichier temporaire, automatiquement supprimé
          (fonction)  | 
       ||
| 
         retourne un nom de fichier unique
          (fonction)  | 
       ||
Synopsis
namespace std { using size_t = /* voir description */; using FILE = /* voir description */; using fpos_t = /* voir description */; } #define NULL /* voir description */ #define _IOFBF /* voir description */ #define _IOLBF /* voir description */ #define _IONBF /* voir description */ #define BUFSIZ /* voir description */ #define EOF /* voir description */ #define FOPEN_MAX /* voir description */ #define FILENAME_MAX /* voir description */ #define L_tmpnam /* voir description */ #define SEEK_CUR /* voir description */ #define SEEK_END /* voir description */ #define SEEK_SET /* voir description */ #define TMP_MAX /* voir description */ #define stderr /* voir description */ #define stdin /* voir description */ #define stdout /* voir description */ namespace std { int remove(const char* filename); int rename(const char* old_p, const char* new_p); FILE* tmpfile(); char* tmpnam(char* s); int fclose(FILE* stream); int fflush(FILE* stream); FILE* fopen(const char* filename, const char* mode); FILE* freopen(const char* filename, const char* mode, FILE* stream); void setbuf(FILE* stream, char* buf); int setvbuf(FILE* stream, char* buf, int mode, size_t size); int fprintf(FILE* stream, const char* format, ...); int fscanf(FILE* stream, const char* format, ...); int printf(const char* format, ...); int scanf(const char* format, ...); int snprintf(char* s, size_t n, const char* format, ...); int sprintf(char* s, const char* format, ...); int sscanf(const char* s, const char* format, ...); int vfprintf(FILE* stream, const char* format, va_list arg); int vfscanf(FILE* stream, const char* format, va_list arg); int vprintf(const char* format, va_list arg); int vscanf(const char* format, va_list arg); int vsnprintf(char* s, size_t n, const char* format, va_list arg); int vsprintf(char* s, const char* format, va_list arg); int vsscanf(const char* s, const char* format, va_list arg); int fgetc(FILE* stream); char* fgets(char* s, int n, FILE* stream); int fputc(int c, FILE* stream); int fputs(const char* s, FILE* stream); int getc(FILE* stream); int getchar(); int putc(int c, FILE* stream); int putchar(int c); int puts(const char* s); int ungetc(int c, FILE* stream); size_t fread(void* ptr, size_t size, size_t nmemb, FILE* stream); size_t fwrite(const void* ptr, size_t size, size_t nmemb, FILE* stream); int fgetpos(FILE* stream, fpos_t* pos); int fseek(FILE* stream, long int offset, int whence); int fsetpos(FILE* stream, const fpos_t* pos); long int ftell(FILE* stream); void rewind(FILE* stream); void clearerr(FILE* stream); int feof(FILE* stream); int ferror(FILE* stream); void perror(const char* s); }