std::basic_filebuf::showmanyc
提供: cppreference.com
< cpp | io | basic filebuf
![]() |
このページは、Google 翻訳を使って英語版から機械翻訳されました。
翻訳には誤りや奇妙な言い回しがあるかもしれません。文章の上にポインタをおくと、元の文章が見れます。誤りを修正して翻訳を改善する手助けをしてください。翻訳についての説明は、ここをクリックしてください。 |
protected: virtual std::streamsize showmanyc() |
||
実装されていれば、ファイルからの読み込みに残された文字の数を返します。.
Original:
If implemented, returns the number of characters left to read from the file.
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:
(none)
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:
The number of characters available for reading from the file, or -1 if the end of file was reached.
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.
[編集] ノート
この機能はオプションです。実装されていない場合、この関数は0を返します(基本クラスバージョンstd::basic_streambuf::showmanycが呼び出されるので)
Original:
This function is optional. If not implemented, this function returns 0 (since the base class version std::basic_streambuf::showmanyc gets called)
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.
get領域が空かどう実装するかどうかにかかわらず、この関数は通常std::basic_streambuf::in_availによって呼び出されます.
Original:
Whether implemented or not, this function is normally called by std::basic_streambuf::in_avail if the get area is empty.
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.
[編集] 例
showmanyc()はfilebufにのために実装されているかどうかを確認するために、実装·テスト
Original:
implementation test to see if showmanyc() is implemented for filebuf
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.
このコードを実行します
#include <fstream> #include <iostream> struct mybuf : std::filebuf { using std::filebuf::showmanyc; }; int main() { mybuf fin; fin.open("test.in", std::ios_base::in); std::cout << "showmanyc() returns " << fin.showmanyc() << '\n'; }
出力:
showmanyc() returns 6626
[編集] も参照してください
get領域で直ちに利用可能な文字数を取得します Original: obtains the number of characters immediately available in the get area The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数of std::basic_streambuf )
| |
文字の既に利用可能なブロックを抽出します Original: extracts already available blocks of characters The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数of std::basic_istream )
|