Files
hustoj/web/cppreference-zh/chmhelp/cpp-io-basic_ios-set_rdbuf.html
2025-08-01 12:57:54 +08:00

74 lines
4.2 KiB
HTML

<!DOCTYPE html>
<html lang="zh" dir="ltr" class="client-nojs" xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh">
<head><meta http-equiv="x-ua-compatible" content="ie=edge">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>std::basic_ios&lt;CharT,Traits&gt;::set_rdbuf</title>
<link rel="stylesheet" href="ext.css" />
<link rel="stylesheet" href="site_modules.css" />
</head>
<body class="mediawiki ltr sitedir-ltr ns-0 ns-subject page-cpp_io_basic_ios_set_rdbuf skin-cppreference2 action-view cpp-navbar">
<div id="cpp-content-base">
<div id="content"><a id="top"></a>
<h1 id="firstHeading" class="firstHeading"><span style="font-size:0.7em; line-height:130%">std::basic_ios&lt;CharT,Traits&gt;::</span>set_rdbuf</h1>
<div id="bodyContent">
<div id="contentSub"><span class="subpages">&lt; <a href="cpp.html">cpp</a>&lrm; | <a href="cpp-io.html">io</a>&lrm; | <a href="cpp-io-basic_ios.html">basic ios</a></span></div>
<div id="mw-content-text" lang="zh" dir="ltr" class="mw-content-ltr" xml:lang="zh">
<table class="t-dcl-begin">
<tbody>
<tr class="t-dcl t-since-cxx11">
<td>
<div><span class="mw-geshi cpp source-cpp"><span class="kw1">protected</span><span class="sy4">:</span><br />
<span class="kw4">void</span> set_rdbuf<span class="br0">(</span> <a href="cpp-io-basic_streambuf.html"><span class="kw1666">std::<span class="me2">basic_streambuf</span></span></a><span class="sy1">&lt;</span>CharT,Traits<span class="sy1">&gt;</span><span class="sy2">*</span> sb <span class="br0">)</span><span class="sy4">;</span></span></div>
</td>
<td class="t-dcl-nopad"></td>
<td><span class="t-mark-rev t-since-cxx11">(C++11 &#36215;)</span></td>
</tr>
<tr class="t-dcl-sep">
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
<p>&#35774;&#32622;&#20851;&#32852;&#27969;&#32531;&#20914;&#20026; <code>sb</code> &#32780;&#19981;&#28165;&#38500;&#38169;&#35823;&#29366;&#24577;&#12290;</p>
<p>&#27492;&#25104;&#21592;&#20989;&#25968;&#21463;&#20445;&#25252;&#65306;&#23427;&#20026;&#27966;&#29983;&#27969;&#65292;&#22914; <span class="t-lc"><a href="cpp-io-basic_ofstream.html">std::basic_ofstream</a></span> &#25110; <span class="t-lc"><a href="cpp-io-basic_istringstream.html">std::basic_istringstream</a></span> &#30340;&#31227;&#21160;&#26500;&#36896;&#20989;&#25968;&#25152;&#35843;&#29992;&#65292;&#20316;&#20026;&#26500;&#36896;&#22522;&#31867;&#21644;&#31227;&#21160;&#27969;&#32531;&#20914;&#21518;&#30340;&#26368;&#32456;&#27493;&#39588;&#65306;&#21482;&#26377;&#26368;&#32456;&#23548;&#20986;&#27969;&#31867;&#30693;&#36947;&#22914;&#20309;&#27491;&#30830;&#31227;&#21160;&#27969;&#32531;&#20914;&#65292;&#20294;&#38656;&#35201;&#20196; <span class="t-lc"><a href="cpp-io-basic_ios.html">std::basic_ios</a></span> &#24847;&#35782;&#21040;&#27969;&#30340;&#26032;&#20301;&#32622;&#65292;&#20351;&#24471;&#20854;&#20844;&#24320;&#25104;&#21592;&#20989;&#25968;&#33021;&#35775;&#38382;&#23427;&#12290;</p>
<h3><span class="mw-headline" id=".E5.8F.82.E6.95.B0">&#21442;&#25968;</span></h3>
<table class="t-par-begin">
<tr class="t-par">
<td>sb</td>
<td>-</td>
<td>&#35201;&#35775;&#38382;&#30340;&#27969;&#32531;&#20914;</td>
</tr>
</table>
<h3><span class="mw-headline" id=".E8.BF.94.E5.9B.9E.E5.80.BC">&#36820;&#22238;&#20540;</span></h3>
<p>&#65288;&#26080;&#65289;</p>
<h3><span class="mw-headline" id=".E5.BC.82.E5.B8.B8">&#24322;&#24120;</span></h3>
<p>&#19981;&#25243;&#20986;&#12290;</p>
<h3><span class="mw-headline" id=".E7.A4.BA.E4.BE.8B">&#31034;&#20363;</span></h3>
<table class="metadata plainlinks ambox mbox-small-left ambox-notice" style="">
<tr>
<td class="mbox-empty-cell"></td>
<td class="mbox-text" style="">&#26412;&#33410;&#26410;&#23436;&#25104;<br />
&#21407;&#22240;&#65306;&#26242;&#26080;&#31034;&#20363;</td>
</tr>
</table>
<h3><span class="mw-headline" id=".E5.8F.82.E9.98.85">&#21442;&#38405;</span></h3>
<table class="t-dsc-begin">
<tr class="t-dsc">
<td>
<div class="t-dsc-member-div">
<div><a href="cpp-io-basic_ios-rdbuf.html"><span class="t-lines"><span>rdbuf</span></span></a></div>
</div>
</td>
<td>&#31649;&#29702;&#30456;&#20851;&#30340;&#27969;&#32531;&#20914;&#21306;<br />
<span class="t-mark">(&#20844;&#24320;&#25104;&#21592;&#20989;&#25968;)</span></td>
</tr>
</table>
</div>
<div class="visualClear"></div>
</div>
</div>
</div>
</body>
</html>