標準ライブラリヘッダー <cstdio>
From cppreference.com
このヘッダーは、C標準ライブラリの <stdio.h> として元々存在していました。
このヘッダーは、Cスタイル入出力ライブラリの一部です。
型 | ||
| Cの入出力ストリームを制御するために必要なすべての情報を保持できるオブジェクト型 (typedef) | ||
| ファイル内の位置を、マルチバイト解析状態を含めて一意に指定できる、完全な非配列オブジェクト型。 (typedef) | ||
| sizeof 演算子が返す符号無し整数型 (typedef) | ||
マクロ | ||
| 処理系定義のヌルポインタ定数 (マクロ定数) | ||
| 入力ストリームに関連付けられた FILE* 型の式 出力ストリームに関連付けられた FILE* 型の式 エラー出力ストリームに関連付けられた FILE* 型の式 (マクロ定数) | ||
| EOF |
int 型で負の値を持つ整数定数式 (マクロ定数) | |
| FOPEN_MAX |
同時に開くことができるファイル数 (マクロ定数) | |
| FILENAME_MAX |
サポートされている最も長いファイル名を格納するために必要な、char の配列のサイズ (マクロ定数) | |
| BUFSIZ |
std::setbuf によって使用されるバッファのサイズ (マクロ定数) | |
| _IOFBF_IOLBF_IONBF |
完全バッファリングI/Oを示す、std::setbuf への引数 ラインバッファリングI/Oを示す、std::setbuf への引数 バッファリングなしI/Oを示す、std::setbuf への引数 (マクロ定数) | |
| SEEK_SETSEEK_CURSEEK_END |
ファイルの先頭からのシークを示す、std::fseek への引数 現在のファイル位置からのシークを示す、std::fseek への引数 ファイルの末尾からのシークを示す、std::fseek への引数 (マクロ定数) | |
| TMP_MAX |
std::tmpnam によって生成できる一意なファイル名の最大数 (マクロ定数) | |
| L_tmpnam |
std::tmpnam の結果を格納するために必要な、char の配列のサイズ (マクロ定数) | |
関数 | ||
ファイルアクセス | ||
| ファイルを開く (関数) | ||
| 既存のストリームを別の名前で開く (関数) | ||
| ファイルを閉じる (関数) | ||
| 出力ストリームを実際のファイルと同期させる (関数) | ||
| ファイルストリームのバッファを設定する (関数) | ||
| ファイルストリームのバッファとそのサイズを設定する (関数) | ||
直接入出力 | ||
| ファイルから読み込む (関数) | ||
| ファイルに書き込む (関数) | ||
非書式化入出力 | ||
ナロー文字 | ||
| ファイルストリームから1文字取得する (関数) | ||
| ファイルストリームから文字列を取得する (関数) | ||
| ファイルストリームに1文字書き込む (関数) | ||
| ファイルストリームに文字列を書き込む (関数) | ||
| stdinから文字を読み取る (関数) | ||
| (C++11で非推奨)(C++14で削除) |
stdinから文字列を読み取る (関数) | |
| stdoutに文字を書き込む (関数) | ||
| stdoutに文字列を書き込む (関数) | ||
| ファイルストリームに1文字を戻す (関数) | ||
書式化入出力 | ||
ナロー/マルチバイト文字 | ||
| stdin、ファイルストリーム、またはバッファから書式付き入力を読み取ります。 (関数) | ||
| (C++11)(C++11)(C++11) |
stdin、ファイルストリーム、またはバッファから書式付き入力を読み取ります。 可変長引数リストを使用する (関数) | |
| (C++11) |
stdout、ファイルストリーム、またはバッファにフォーマットされた出力を書き込む (関数) | |
| stdout、ファイルストリーム、またはバッファにフォーマットされた出力を書き込む 可変長引数リストを使用する (関数) | ||
ファイルポジショニング | ||
| 現在のファイル位置指示子を返す (関数) | ||
| ファイル位置指示子を取得する (関数) | ||
| ファイル位置指示子をファイル内の特定の場所に移動する (関数) | ||
| ファイル位置指示子をファイル内の特定の場所に移動する (関数) | ||
| ファイル位置指示子をファイルの先頭に移動する (関数) | ||
エラーハンドリング | ||
| エラーをクリアする (関数) | ||
| ファイルの終端をチェックする (関数) | ||
| ファイルエラーをチェックする (関数) | ||
| 現在のエラーに対応する文字列を stderr に表示する (関数) | ||
ファイル操作 | ||
| ファイルを削除する (関数) | ||
| ファイル名を変更する (関数) | ||
| 一時的で自動的に削除されるファイルを作成し、開く (関数) | ||
| 一意なファイル名を返す (関数) | ||
[編集] 概要
namespace std { using size_t = /* see description */; using FILE = /* see description */; using fpos_t = /* see description */; } #define NULL /* see description */ #define _IOFBF /* see description */ #define _IOLBF /* see description */ #define _IONBF /* see description */ #define BUFSIZ /* see description */ #define EOF /* see description */ #define FOPEN_MAX /* see description */ #define FILENAME_MAX /* see description */ #define L_tmpnam /* see description */ #define SEEK_CUR /* see description */ #define SEEK_END /* see description */ #define SEEK_SET /* see description */ #define TMP_MAX /* see description */ #define stderr /* see description */ #define stdin /* see description */ #define stdout /* see 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); }