Input/output library
提供: cppreference.com
< cpp
![]() |
このページは、Google 翻訳を使って英語版から機械翻訳されました。
翻訳には誤りや奇妙な言い回しがあるかもしれません。文章の上にポインタをおくと、元の文章が見れます。誤りを修正して翻訳を改善する手助けをしてください。翻訳についての説明は、ここをクリックしてください。 |
C + +の2入力/出力ライブラリが含まれています:現代、ストリームベースのI / OライブラリとCスタイルのI / O関数の標準セットを.
Original:
C++ includes two input/output libraries: a modern, stream-based I/O library and the standard set of C-style I/O functions.
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.
[編集] ストリームベースのI / O
ストリームベースの入力/出力ライブラリが抽象的な入力/出力デバイスを中心に編成されています。これらの抽象的なデバイスは、同じコードがファイル、メモリストリーム、またはその場で任意の操作を(例えば圧縮)を実行するカスタム·アダプター·デバイスへの入力/出力を処理できるように.
Original:
The stream-based input/output library is organized around abstract input/output devices. These abstract devices allow the same code to handle input/output to files, memory streams, or custom adaptor devices that perform arbitrary operations (e.g. compression) on the fly.
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.
クラスのほとんどがテンプレート化されており、それが任意の基本文字型に適応することができます。別個のtypedefが最も一般的な基本的な種類の文字(charとwchar_t)のために提供されています。クラスは、次の階層に編成されています
Original:
Most of the classes are templated, so they can be adapted to any basic character type. Separate typedefs are provided for the most common basic character types (char and wchar_t). The classes are organized into the following hierarchy:
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: Abstraction The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
書式化フラグおよび入力/出力の例外を管理します Original: manages formatting flags and input/output exceptions The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラス) | |
任意のストリームバッファを管理します Original: manages an arbitrary stream buffer The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) | |
rawデバイスを抽象化します Original: abstracts a raw device The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) | |
与えられた抽象的なデバイス(std::basic_streambuf) をラップして、高レベルの入力インターフェースを提供します Original: wraps a given abstract device (std::basic_streambuf) and provides high-level input interface The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) | |
与えられた抽象的なデバイス(std::basic_streambuf) をラップし、ハイレベルの出力インタフェースを提供します Original: wraps a given abstract device (std::basic_streambuf) and provides high-level output interface The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) | |
与えられた抽象的なデバイス(std::basic_streambuf) をラップして、ハイレベル入力/出力インターフェイスを提供します Original: wraps a given abstract device (std::basic_streambuf) and provides high-level input/output interface The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) | |
Original: File I/0 implementation The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
RAWファイル·デバイスを実装しています Original: implements raw file device The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) | |
高レベルのファイルストリームの入力操作を実装します Original: implements high-level file stream input operations The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) | |
高レベルのファイルストリーム出力操作を実装します Original: implements high-level file stream output operations The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) | |
高レベルのファイルストリーム入力/出力操作を実装します Original: implements high-level file stream input/output operations The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) | |
Original: String I/0 implementation The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
生の文字列のデバイスを実装しています Original: implements raw string device The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) | |
高レベルの文字列ストリームの入力操作を実装します Original: implements high-level string stream input operations The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) | |
高レベルの文字列ストリーム出力操作を実装します Original: implements high-level string stream output operations The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) | |
高レベルの文字列ストリームの入力/出力操作を実装しています Original: implements high-level string stream input/output operations The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) | |
Original: Array I/O implementations The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
(廃止予定) |
生の文字配列デバイスを実装しています Original: implements raw character array device The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラス) |
(廃止予定) |
文字配列の入力操作を実装します Original: implements character array input operations The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラス) |
(廃止予定) |
文字配列の出力操作を実装しています Original: implements character array output operations The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラス) |
(廃止予定) |
文字配列の入力/出力操作を実装しています Original: implements character array input/output operations The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラス) |
[編集] typedef
一般的な文字の型については、以下のtypedefが用意されています。
{{tr|typedefはbasic_ios <char>をIOS;|typedef basic_ios<char> ios;}} {{tr|typedefはbasic_ios <wchar_t> wios;|typedef basic_ios<wchar_t> wios;}} {{tr|typedefをbasic_streambufの<char>をにstreambuf;|typedef basic_streambuf<char> streambuf;}} {{tr|typedefをbasic_streambufの<wchar_t>のwstreambuf;|typedef basic_streambuf<wchar_t> wstreambuf;}} {{tr|typedefのbasic_filebuf <char>をfilebufで;|typedef basic_filebuf<char> filebuf;}} {{tr|typedefのbasic_filebuf <wchar_t> wfilebuf;|typedef basic_filebuf<wchar_t> wfilebuf;}} {{tr|typedefはbasic_stringbuf <char>をstringbuf;|typedef basic_stringbuf<char> stringbuf;}} {{tr|typedefはbasic_stringbuf <wchar_t> wstringbuf;|typedef basic_stringbuf<wchar_t> wstringbuf;}} {{tr|typedefはbasic_istreamの<char>をのistreamに;|typedef basic_istream<char> istream;}} {{tr|typedefはbasic_istream <wchar_t> wistream;|typedef basic_istream<wchar_t> wistream;}} {{tr|typedefであるbasic_ostream <char>をostreamに;|typedef basic_ostream<char> ostream;}} {{tr|typedefであるbasic_ostream <wchar_t> wostream;|typedef basic_ostream<wchar_t> wostream;}} {{tr|typedefはbasic_iostream <char>をiostreamの;|typedef basic_iostream<char> iostream;}} {{tr|typedefはbasic_iostream <wchar_t> wiostream;|typedef basic_iostream<wchar_t> wiostream;}} {{tr|typedefはbasic_ifstream <char>をifstreamの;|typedef basic_ifstream<char> ifstream;}} {{tr|typedefはbasic_ifstream <wchar_t> wifstream;|typedef basic_ifstream<wchar_t> wifstream;}} {{tr|typedefはbasic_ofstream <char>をofstreamの;|typedef basic_ofstream<char> ofstream;}} {{tr|typedefはbasic_ofstream <wchar_t> wofstream;|typedef basic_ofstream<wchar_t> wofstream;}} {{tr|typedefはbasic_fstream <char>をfstreamの;|typedef basic_fstream<char> fstream;}} {{tr|typedefはbasic_fstream <wchar_t> wfstream;|typedef basic_fstream<wchar_t> wfstream;}} {{tr|typedefはbasic_istringstream <char>をistringstream;|typedef basic_istringstream<char> istringstream;}} {{tr|typedefはbasic_istringstream <wchar_t> wistringstream;|typedef basic_istringstream<wchar_t> wistringstream;}} {{tr|typedefはbasic_ostringstream <char>をostringstream;|typedef basic_ostringstream<char> ostringstream;}} {{tr|typedefはbasic_ostringstream <wchar_t> wostringstream;|typedef basic_ostringstream<wchar_t> wostringstream;}} {{tr|typedefはbasic_stringstream <char>をstringstreamを;|typedef basic_stringstream<char> stringstream;}} {{tr|typedefはbasic_stringstream <wchar_t> wstringstream;|typedef basic_stringstream<wchar_t> wstringstream;}} {{tr|</ソース>|
事前定義された標準のストリームオブジェクト:
Original:
Predefined standard stream objects:
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.
}} {{tr|externをistreamのCIN / /標準入力(stdin)|extern istream cin; //standard input (stdin)}} {{tr|externをwistream wcin;|extern wistream wcin;}} {{tr|externをostreamにcoutの/ /標準出力(stdout)|extern ostream cout; //standard output (stdout)}} {{tr|externをwostream wcout;|extern wostream wcout;}} {{tr|externをostreamにcerrを/ /標準エラー出力(stderr)|extern ostream cerr; //standard error (stderr)}} {{tr|externをwostream wcerr;|extern wostream wcerr;}} {{tr|のextern ostreamの動きを妨げる; / /標準のログ(stdlog)|extern ostream clog; //standard log (stdlog)}} {{tr|externをwostream wclog;|extern wostream wclog;}} {{tr|</ソース>|
Original:
{{{2}}}
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.
[編集] I / Oのマニピュレータ
ストリームベースのI / Oライブラリは、ストリームがどのように動作するかを制御するためにI / Oのマニピュレータ(例えばstd::boolalpha、std::hex、等)を使用して.
Original:
The stream-based I/O library uses I / Oのマニピュレータ (e.g. std::boolalpha, std::hex, etc.) to control how streams behave.
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:
The following auxiliary types are defined:
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.
Defined in header
<ios> | |
任意のファイルの大きさを表現するのに十分な相対ファイル/ストリームの位置を(FPOSからのオフセット)を表している Original: represents relative file/stream position (offset from fpos), sufficient to represent any file size The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (typedef) | |
I / O操作またはI / Oバッファのサイズで転送された文字の数を表します Original: represents the number of characters transferred in an I/O operation or the size of an I/O buffer The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (typedef) | |
ストリームまたはファイル内の絶対位置を表しています Original: represents absolute position in a stream or a file The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) |
std::fposの4つの専門分野が用意されています
Original:
Four specializations of std::fpos are provided:
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.
Defined in header
<ios> | |
タイプ
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 |
streampos
|
std::fpos<std::char_traits<char>::state_type> |
u16streampos
|
std::fpos<std::char_traits<char16_t>::state_type> |
u32streampos
|
std::fpos<std::char_traits<char32_t>::state_type> |
wstreampos
|
std::fpos<std::char_traits<wchar_t>::state_type> |
[編集] エラーカテゴリインターフェース
Defined in header
<ios> | |
(C++11) |
IOストリーム·エラー·コード Original: the IO stream error codes The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (列挙) |
(C++11) |
iostreamのエラー·カテゴリを識別します Original: identifies the iostream error category The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (関数) |
[編集] CスタイルのIO
C + +は、このようなCとしてstd::fopenを含み、std::getcなど
Original:
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.