上传cppreference
This commit is contained in:
95
web/cppreference-zh/chmhelp/cpp-io-c-fsetpos.html
Normal file
95
web/cppreference-zh/chmhelp/cpp-io-c-fsetpos.html
Normal file
@@ -0,0 +1,95 @@
|
||||
<!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::fsetpos</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_c_fsetpos 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::</span>fsetpos</h1>
|
||||
<div id="bodyContent">
|
||||
<div id="contentSub"><span class="subpages">< <a href="cpp.html">cpp</a>‎ | <a href="cpp-io.html">io</a>‎ | <a href="cpp-io-c.html">c</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-dsc-header">
|
||||
<td>
|
||||
<div>定义于头文件 <code><a href="cpp-header-cstdio.html"><cstdio></a></code></div>
|
||||
</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class="t-dcl">
|
||||
<td class="t-dcl-nopad">
|
||||
<div><span class="mw-geshi cpp source-cpp"><span class="kw4">int</span> fsetpos<span class="br0">(</span> <a href="cpp-io-c.html"><span class="kw1876">std::<span class="me2">FILE</span></span></a><span class="sy2">*</span> stream, <span class="kw4">const</span> <a href="cpp-io-c.html"><span class="kw1877">std::<span class="me2">fpos_t</span></span></a><span class="sy2">*</span> pos <span class="br0">)</span><span class="sy4">;</span></span></div>
|
||||
</td>
|
||||
<td class="t-dcl-nopad"></td>
|
||||
<td class="t-dcl-nopad"></td>
|
||||
</tr>
|
||||
<tr class="t-dcl-sep">
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>按照 <code>pos</code> 所指向的值,设置 C 文件流 <code>stream</code> 的文件位置指示器和多字节分析状态(若存在)。</p>
|
||||
<p>除了建立新的分析状态和位置,调用此函数还会撤销 <span class="t-lc"><a href="cpp-io-c-ungetc.html">std::ungetc</a></span> 的效果,并若设置了文件尾状态则清除之。</p>
|
||||
<p>若读或写失败,则设置流的错误指示器( <span class="t-lc"><a href="cpp-io-c-ferror.html">std::ferror</a></span> )。</p>
|
||||
<h3><span class="mw-headline" id=".E5.8F.82.E6.95.B0">参数</span></h3>
|
||||
<table class="t-par-begin">
|
||||
<tr class="t-par">
|
||||
<td>stream</td>
|
||||
<td>-</td>
|
||||
<td>要修改的文件流</td>
|
||||
</tr>
|
||||
<tr class="t-par">
|
||||
<td>pos</td>
|
||||
<td>-</td>
|
||||
<td>指向 <span class="t-c"><span class="mw-geshi cpp source-cpp">fpos_t</span></span> 对象的指针,该对象获得自对与同一文件关联的流上的 <span class="t-lc"><a href="cpp-io-c-fgetpos.html">std::fgetpos</a></span> 调用</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3><span class="mw-headline" id=".E8.BF.94.E5.9B.9E.E5.80.BC">返回值</span></h3>
|
||||
<p>成功时为 <span class="t-c"><span class="mw-geshi cpp source-cpp">​<span class="nu0">0</span>​</span></span> ,否则为非零值。失败时还设置 <span class="t-lc"><a href="cpp-error-errno.html">errno</a></span> 。</p>
|
||||
<h3><span class="mw-headline" id=".E6.B3.A8.E6.84.8F">注意</span></h3>
|
||||
<p>在寻位到宽流的非结尾位置后,下个对任何输出函数的调用可能使剩下的文件内容未定义,例如通过输出不同长度的多字节序列。</p>
|
||||
<h3><span class="mw-headline" id=".E5.8F.82.E9.98.85">参阅</span></h3>
|
||||
<table class="t-dsc-begin">
|
||||
<tr class="t-dsc">
|
||||
<td>
|
||||
<div class="t-dsc-member-div">
|
||||
<div><a href="cpp-io-c-fgetpos.html"><span class="t-lines"><span>fgetpos</span></span></a></div>
|
||||
</div>
|
||||
</td>
|
||||
<td>获取文件位置指示器<br />
|
||||
<span class="t-mark">(函数)</span></td>
|
||||
</tr>
|
||||
<tr class="t-dsc">
|
||||
<td>
|
||||
<div class="t-dsc-member-div">
|
||||
<div><a href="cpp-io-c-ftell.html"><span class="t-lines"><span>ftell</span></span></a></div>
|
||||
</div>
|
||||
</td>
|
||||
<td>返回当前文件位置指示器<br />
|
||||
<span class="t-mark">(函数)</span></td>
|
||||
</tr>
|
||||
<tr class="t-dsc">
|
||||
<td>
|
||||
<div class="t-dsc-member-div">
|
||||
<div><a href="cpp-io-c-fseek.html"><span class="t-lines"><span>fseek</span></span></a></div>
|
||||
</div>
|
||||
</td>
|
||||
<td>移动文件位置指示器到文件中的指定位置<br />
|
||||
<span class="t-mark">(函数)</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="visualClear"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user