std::basic_streambuf::pbump
提供: cppreference.com
< cpp | io | basic streambuf
![]() |
このページは、Google 翻訳を使って英語版から機械翻訳されました。
翻訳には誤りや奇妙な言い回しがあるかもしれません。文章の上にポインタをおくと、元の文章が見れます。誤りを修正して翻訳を改善する手助けをしてください。翻訳についての説明は、ここをクリックしてください。 |
void pbump( int count ); |
||
再配置され、は
pptr()
は正でも負でもcount
文字によってポインタを(count
)を置きます。チェックはput領域[pbase(), epptr())
外にポインタを移動するために行われていません.Original:
Repositions the put pointer (
pptr()
) by count
characters, where count
may be positive or negative. No checks are done for moving the pointer outside the put area [pbase(), epptr())
.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.
ポインタが
overflow()
が関連付け文字シーケンスにput領域をフラッシュするために呼び出された後、高度である場合は、効果は未定義の値の余分なcount
文字が出力されている.Original:
If the pointer is advanced and then
overflow()
is called to flush the put area to the associated character sequence, the effect is that extra count
characters with undefined values are 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.
目次 |
[編集] パラメータ
count | - | 出力ポインタに追加する番号
Original: number to add to the put pointer The text has been machine-translated via Google Translate. 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.
[編集] 例
このコードを実行します
#include <iostream> #include <string> #include <fstream> struct showput_streambuf : std::filebuf { using std::filebuf::pbump; // expose protected std::string showput() const { return std::string(pbase(), pptr()); } }; int main() { showput_streambuf mybuf; mybuf.open("test.txt", std::ios_base::out); std::ostream str(&mybuf); str << "This is a test" << std::flush << "1234"; std::cout << "The put area contains: " << mybuf.showput() << '\n'; mybuf.pbump(10); std::cout << "after pbump(10), it contains " << mybuf.showput() << '\n'; }
出力:
The put area contains: 1234 after pbump(10), it contains 1234 is a test
[編集] も参照してください
進歩入力シーケンス内の次のポインタ Original: advances the next pointer in the input sequence The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (protectedメンバー関数) |