C-style file input/output
提供: cppreference.com
![]() | このページは、Google 翻訳を使って英語版から機械翻訳されました。 翻訳には誤りや奇妙な言い回しがあるかもしれません。文章の上にポインタをおくと、元の文章が見れます。誤りを修正して翻訳を改善する手助けをしてください。翻訳についての説明は、ここをクリックしてください。 |
C + +標準ライブラリのCI / Oの部分集合は、Cスタイルのストリーム入力/出力操作を実装します。
<cstdio>
ヘッダが狭いと、マルチバイト文字の入力/出力機能を備えた一般的なファイル操作支援や物資の機能を提供し、<cwchar>
ヘッダは、ワイド文字の入力/出力機能を備えた機能を提供します. Original:
The C I/O subset of the C++ standard library implements C-style stream input/output operations. The
<cstdio>
header provides generic file operation support and supplies functions with narrow and multibyte character input/output capabilities, and the <cwchar>
header provides functions with wide character input/output capabilities. The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
C言語のストリーム型のみstd::FILE(注のポインタ経由でアクセスして操作することができるタイプstd::FILE*のオブジェクトである:それは、このようなコピーのアドレスを使用して、間接参照し、有効なstd::FILEをコピーすることによって、タイプFILE*のローカルオブジェクトを作成することは可能かもしれないがI / O機能)未定義の動作です。各Cストリームは、外部の物理デバイス(ファイル、標準入力ストリーム、プリンタ、シリアルポートなど)に関連付けられています.
Original:
C streams are objects of type std::FILE that can only be accessed and manipulated through pointers of type std::FILE* (Note: while it may be possible to create a local object of type std::FILE by dereferencing and copying a valid FILE*, using the address of such copy in the I/O functions is undefined behavior). Each C stream is associated with an external physical device (file, standard input stream, printer, serial port, etc).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
C言語のストリームはフォーマットされていないと、フォーマットされた入力と出力の両方に使用することができます。彼らは、ロケールに依存し、必要に応じてワイド/マルチバイト変換を実行することができる。とは異なり、C + +のストリームは、各ストリームは独自のロケールに関連付けられている、すべてのCのストリームは、同じロケールオブジェクトアクセス:最も最近std::setlocaleと共にインストールいずれかを.
Original:
C streams can be used for both unformatted and formatted input and output. They are locale-sensitive and may perform wide/multibyte conversions as necessary. Unlike C++ streams, where each stream is associated with its own locale, all C streams access the same locale object: the one most recently installed with std::setlocale.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
デバイス(例えば、POSIXのファイル記述子)にアクセスするために必要なシステム固有の情報に加えて、各Cストリームオブジェクトには、以下を保持します
Original:
Besides the system-specific information necessary to access the device (e.g. a POSIX file descriptor), each C stream object holds the following:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
1)
文字幅:ナローまたはワイド
Original:
Character width: narrow or wide
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
2)
バッファリング状態:バッファリングされていない、完全バッファ、ラインバッファ.
Original:
Buffering state: unbuffered, line-buffered, fully buffered.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
3)
、ユーザ提供の外部バッファで置き換えることができるバッファ、.
Original:
The buffer, which may be replaced by an external, user-provided buffer.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
4)
I / Oモード:入力、出力、または更新(入力と出力の両方).
Original:
I/O mode: input, output, or update (both input and output).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
5)
バイナリ/テキスト·モード·インディケーター.
Original:
Binary/text mode indicator.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
6)
エンド·オブ·ファイルのステータスインジケータ.
Original:
End-of-file status indicator.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
7)
エラーステータスインジケータ.
Original:
Error status indicator.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
8)
ワイド文字ストリームのために、パースの状態を含む、ファイル位置指示子(タイプstd::fpos_tのオブジェクト)、(型のオブジェクトmbstate_t).
Original:
File position indicator (an object of type std::fpos_t), which, for wide character streams, includes the parse state (an object of type mbstate_t).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[編集]機能します
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. | |
ファイルを開きます 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. (関数) | |
別の名前で既存のストリームを開きます 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. (関数) | |
ファイルを閉じます 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. (関数) | |
実際のファイルで出力ストリームを同期させます 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. (関数) | |
ワイド文字I / Oと狭い文字間のファイルストリームを切り替えI / O Original: switches a file stream between wide character I/O and narrow character I/O The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (関数) | |
ファイルストリーム用のバッファを設定します 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. (関数) | |
ファイルストリーム用のバッファとそのサイズを設定します 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. (関数) | |
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. | |
ファイルから読み込みます 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. (関数) | |
ファイルに書き込みます 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. (関数) | |
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. | |
Original: Narrow character The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
ファイルストリームから文字を取得します 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. (関数) | |
ファイルストリームから文字列を取得します 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. (関数) | |
ファイルストリームに文字を書き込みます 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. (関数) | |
ファイルストリームに文字列を書き込みます 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. (関数) | |
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. (関数) | |
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. (関数) | |
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. (関数) | |
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. (関数) | |
ファイルストリームに戻す文字を入れます 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. (関数) | |
Original: Wide character The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
ファイルストリームからワイド文字を取得します Original: gets a wide 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. (関数) | |
ファイルストリームからワイド文字列を取得します Original: gets a wide 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. (関数) | |
ファイルストリームにワイド文字を書き込みます Original: writes a wide 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. (関数) | |
ファイルストリームにワイド文字列を書き込みます Original: writes a wide 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. (関数) | |
stdinからワイド文字を読み込みます Original: reads a wide 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. (関数) | |
stdoutにワイド文字を書き込みます Original: writes a wide 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. (関数) | |
ファイルストリームにワイド文字に戻します Original: puts a wide 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. (関数) | |
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. | |
Original: Narrow/multibyte character The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
stdin、ファイルストリームまたはバッファからの書式付き入力を読み取ります 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. (関数) | |
(C++11) (C++11) (C++11) | stdin、ファイルストリームまたは可変引数リストを使用してbuffer から書式付き入力を読み取ります 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. (関数) |
(C++11) | プリントはstdout、ファイルストリームまたはバッファに出力をフォーマットします Original: prints formatted output to stdout, 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. (関数) |
プリントはstdout、ファイルストリームまたは可変引数リストを使用してbuffer に出力をフォーマットします 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. (関数) | |
Original: Wide character The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
stdin、ファイルストリームまたはバッファから書式ワイド文字入力を読み取ります Original: reads formatted wide character 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. (関数) | |
(C++11) (C++11) (C++11) | stdin、ファイルstream または可変引数リストを使用してバッファから書式ワイド文字入力を読み取ります Original: reads formatted wide character 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. (関数) |
プリントはstdout、ファイルストリームまたはバッファにワイド文字出力をフォーマットします Original: prints formatted wide character output to stdout, 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. (関数) | |
プリントはstdout、ファイルstream または可変引数リストを使用してバッファにワイド文字出力をフォーマットします Original: prints formatted wide character 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. (関数) | |
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. | |
現在のファイル位置指示子を返します 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. (関数) | |
ファイル位置指示子を取得します 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. (関数) | |
ファイル位置指示子は、ファイル内の特定の場所に移動します 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. (関数) | |
ファイル位置指示子は、ファイル内の特定の場所に移動します 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. (関数) | |
ファイル位置指示子は、ファイル内の先頭に移動します 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. (関数) | |
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. | |
エラーをクリアします 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. (関数) | |
エンド·オブ·ファイルをチェックします 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. (関数) | |
ファイルのエラーをチェックします 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. (関数) | |
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. (関数) | |
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. | |
ファイルを消去 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. (関数) | |
ファイルの名前を変更します 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. (関数) | |
作成され、一時的な、自動削除するファイルを開きます 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. (関数) | |
一意のファイル名を返します 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. (関数) |
[編集]タイプ
Defined in header <cstdio> | |
タイプ Original: Type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | Definition |
FILE | CI / Oストリームを制御するために必要なすべての情報を保持することが可能なタイプ Original: type, capable of holding all information needed to control a C I/O stream The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
fpos_t | 一意のファイル内の位置を特定することができるタイプ Original: type, capable of uniquely specifying a position 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. |
[編集]マクロ
Defined in header <cstdio> | |
stdin stdout stderr | 型の式FILE*はエラー出力ストリームに関連付けられた型 の出力streamFILE*expressionに関連付けられた型の入力stream expressionFILE*に関連付けられている Original: expression of type FILE* associated with the input stream expression of type FILE* associated with the output stream expression of type FILE* associated with the error output stream The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (マクロ定数) |
EOF | タイプintと負の値の整数定数式 Original: integer constant expression of type int and negative value The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (マクロ定数) |
FOPEN_MAX | 同時にオープンできるファイルの数 Original: number of files that can be open simultaneously The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (マクロ定数) |
FILENAME_MAX | サイズは最長のサポートされているファイル名を保持するためにchar型の配列のために必要 Original: size needed for an array of char to hold the longest supported file name The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (マクロ定数) |
BUFSIZ | std::setbufで使用されるバッファのサイズ Original: size of the buffer used by std::setbuf The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (マクロ定数) |
_IOFBF _IOLBF _IONBF | 完全に、I /std::setbuf示す行へO argumentは非バッファI / Oを示すstd::setbufへのI /O argumentをバッファリングバッファリングされたことを示すstd::setbufへの引数 Original: argument to std::setbuf indicating fully buffered I/O argument to std::setbuf indicating line buffered I/O argument to std::setbuf indicating unbuffered I/O The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (マクロ定数) |
SEEK_SET SEEK_CUR SEEK_END | ファイルの終端からシークを示すstd::fseekに現在のファイルposition argumentから求める示すfilestd::fseekargumentの先頭から までシークを示すstd::fseekへの引数 Original: argument to std::fseek indicating seeking from beginning of the file argument to std::fseek indicating seeking from the current file position argument to std::fseek indicating seeking from end of the file The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (マクロ定数) |
TMP_MAX | std::tmpnamによって生成することができるユニークなファイル名の最大数 Original: maximum number of unique filenames that can be generated by std::tmpnam The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (マクロ定数) |
L_tmpnam | サイズはstd::tmpnamの結果を保持するchar型の配列のために必要 Original: size needed for an array of char to hold the result of std::tmpnam The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (マクロ定数) |