C++ 流緩衝區 - 溢位



描述

它用於放置字元並將 c 寫入 put 指標 (pptr) 的當前位置,並將該指標向前移動一個位置。

宣告

以下是 std::basic_stringbuf::overflow 的宣告。

int_type overflow (int_type c = traits_type::eof());

引數

c要放回的字元。

返回值

它返回一個非檔案結束值 (traits_type::eof()):如果字元 c 成功寫入則返回成功,否則返回檔案結束值。

異常

基本保證 - 如果丟擲異常,則物件處於有效狀態。

資料競爭

它修改 basic_stringbuf 物件。

streambuf.htm
廣告

© . All rights reserved.