名前空間
変種
操作

標準ライブラリヘッダ <cstdio>

提供: cppreference.com
< cpp‎ | header
 
 
 

このヘッダは元々 C 標準ライブラリに <stdio.h> として存在していました。

このヘッダは C スタイルの入出力ライブラリの一部です。

目次

C の入出力ストリームを制御するために必要なすべての情報を保持できるオブジェクト型
(typedef) [edit]
ファイルの位置 (マルチバイトパース状態を含む) を一意に指定できる非配列完全オブジェクト型
(typedef) [edit]
sizeof 演算子によって返される符号なし整数型
(typedef) [edit]

マクロ

処理系定義のヌルポインタ定数
(マクロ定数) [edit]
入力ストリームに関連付けられた FILE* 型の式
出力ストリームに関連付けられた FILE* 型の式
エラー出力ストリームに関連付けられた FILE* 型の式
(マクロ定数) [edit]
EOF
負の値を持つ int 型の整数定数式
(マクロ定数)
FOPEN_MAX
同時にオープンできるファイルの最大数
(マクロ定数)
FILENAME_MAX
サポートされている最も長いファイル名を保持するために必要な char 配列のサイズ
(マクロ定数)
BUFSIZ
std::setbuf で使用されるバッファのサイズ
(マクロ定数)
_IOFBF_IOLBF_IONBF
完全バッファリングを表す std::setvbuf に渡す引数
行バッファリングを表す std::setvbuf に渡す引数
バッファリングなしを表す std::setvbuf に渡す引数
(マクロ定数)
SEEK_SETSEEK_CURSEEK_END
ファイルの先頭からシークすることを表す std::fseek に渡す引数
現在のファイル位置からシークすることを表す std::fseek に渡す引数
ファイルの終端からシークすることを表す std::fseek に渡す引数
(マクロ定数)
TMP_MAX
std::tmpnam で生成できる一意なファイル名の最大数
(マクロ定数)
L_tmpnam
std::tmpnam の結果を保持するために必要な char 配列のサイズ
(マクロ定数)

関数

ファイルアクセス
ファイルを開きます
(関数) [edit]
既存のストリームを別の名前で開きます
(関数) [edit]
ファイルを閉じます
(関数) [edit]
出力ストリームを実際のファイルと同期させます
(関数) [edit]
ファイルストリームのためのバッファを設定します
(関数) [edit]
ファイルストリームのためのバッファとそのサイズを設定します
(関数) [edit]
直接入出力
ファイルから読み込みます
(関数) [edit]
ファイルに書き込みます
(関数) [edit]
書式なし入出力
ナロー文字
ファイルストリームから文字を取得します
(関数) [edit]
ファイルストリームから文字列を取得します
(関数) [edit]
ファイルストリームに文字を書き込みます
(関数) [edit]
ファイルストリームに文字列を書き込みます
(関数) [edit]
stdin から文字を読み込みます
(関数) [edit]
(C++11で非推奨)(C++14で削除)
stdin から文字列を読み込みます
(関数) [edit]
stdout に文字を書き込みます
(関数) [edit]
stdout に文字列を書き込みます
(関数) [edit]
ファイルストリームに文字を戻します
(関数) [edit]
書式付き入出力
ナロー/マルチバイト文字
stdin、ファイルストリームまたはバッファから書式付き入力を行います
(関数) [edit]
(C++11)(C++11)(C++11)
可変個引数リストを使用して stdin、ファイルストリームまたはバッファから書式付き入力を行います
(関数) [edit]
stdout、ファイルストリームまたはバッファに書式付き出力を行います
(関数) [edit]
可変個引数リストを使用して stdout、ファイルストリームまたはバッファに書式付き出力を行います
(関数) [edit]
ファイル位置操作
現在のファイル位置指示子を返します
(関数) [edit]
ファイル位置指示子を取得します
(関数) [edit]
ファイル位置指示子をファイル内の指定された位置に移動させます
(関数) [edit]
ファイル位置指示子をファイル内の指定された位置に移動させます
(関数) [edit]
ファイル��置指示子をファイルの先頭に移動させます
(関数) [edit]
エラー処理
エラーをクリアします
(関数) [edit]
ファイルの終端かどうか調べます
(関数) [edit]
ファイルのエラーを調べます
(関数) [edit]
現在のエラーに対応する文字列を stderr に出力します
(関数) [edit]
ファイルに対する操作
ファイルを消去します
(関数) [edit]
ファイルの名前を変更します
(関数) [edit]
自動的に削除される一時的なファイルを開きます
(関数) [edit]
一意なファイル名を返します
(関数) [edit]

[編集] 概要

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);
}

[編集] ノート