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

115 lines
5.5 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::ftell</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_ftell 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>ftell</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-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>&#23450;&#20041;&#20110;&#22836;&#25991;&#20214; <code><a href="cpp-header-cstdio.html">&lt;cstdio&gt;</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">long</span> ftell<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="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>&#36820;&#22238;&#25991;&#20214;&#27969; <code>stream</code> &#30340;&#25991;&#20214;&#20301;&#32622;&#25351;&#31034;&#22120;&#30340;&#24403;&#21069;&#20540;&#12290;</p>
<p>&#33509;&#27969;&#20197;&#20108;&#36827;&#21046;&#27169;&#24335;&#25171;&#24320;&#65292;&#21017;&#27492;&#20989;&#25968;&#33719;&#24471;&#30340;&#20540;&#26159;&#36317;&#25991;&#20214;&#36215;&#22987;&#30340;&#23383;&#33410;&#25968;&#12290;</p>
<p>&#33509;&#27969;&#20197;&#25991;&#26412;&#27169;&#24335;&#25171;&#24320;&#65292;&#21017;&#27492;&#20989;&#25968;&#30340;&#36820;&#22238;&#20540;&#26159;&#26410;&#25351;&#23450;&#30340;&#65292;&#32780;&#19988;&#20165;&#33509;&#20316;&#20026; <span class="t-lc"><a href="cpp-io-c-fseek.html">std::fseek</a></span> &#30340;&#36755;&#20837;&#25165;&#26377;&#24847;&#20041;&#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>stream</td>
<td>-</td>
<td>&#35201;&#26816;&#39564;&#30340;&#25991;&#20214;&#27969;</td>
</tr>
</table>
<h3><span class="mw-headline" id=".E8.BF.94.E5.9B.9E.E5.80.BC">&#36820;&#22238;&#20540;</span></h3>
<p>&#25104;&#21151;&#26102;&#20026;&#25991;&#20214;&#20301;&#32622;&#25351;&#31034;&#22120;&#65292;&#33509;&#22833;&#36133;&#20986;&#29616;&#21017;&#20026; <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="sy2">-</span><span class="nu0">1L</span></span></span> &#12290;&#22833;&#36133;&#26102;&#20134;&#35774;&#32622; <span class="t-lc"><a href="cpp-error-errno.html">errno</a></span> &#12290;</p>
<h3><span class="mw-headline" id=".E5.8F.82.E6.95.B0_2">&#21442;&#25968;</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-c-fgetpos.html"><span class="t-lines"><span>fgetpos</span></span></a></div>
</div>
</td>
<td>&#33719;&#21462;&#25991;&#20214;&#20301;&#32622;&#25351;&#31034;&#22120;<br />
<span class="t-mark">(&#20989;&#25968;)</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>&#31227;&#21160;&#25991;&#20214;&#20301;&#32622;&#25351;&#31034;&#22120;&#21040;&#25991;&#20214;&#20013;&#30340;&#25351;&#23450;&#20301;&#32622;<br />
<span class="t-mark">(&#20989;&#25968;)</span></td>
</tr>
<tr class="t-dsc">
<td>
<div class="t-dsc-member-div">
<div><a href="cpp-io-c-fsetpos.html"><span class="t-lines"><span>fsetpos</span></span></a></div>
</div>
</td>
<td>&#31227;&#21160;&#25991;&#20214;&#20301;&#32622;&#25351;&#31034;&#22120;&#21040;&#25991;&#20214;&#20013;&#30340;&#25351;&#23450;&#20301;&#32622;<br />
<span class="t-mark">(&#20989;&#25968;)</span></td>
</tr>
<tr class="t-dsc">
<td>
<div class="t-dsc-member-div">
<div><a href="cpp-io-basic_istream-tellg.html"><span class="t-lines"><span>tellg</span></span></a></div>
</div>
</td>
<td>&#36820;&#22238;&#36755;&#20837;&#20301;&#32622;&#25351;&#31034;&#22120;<br />
<span class="t-mark">(<code>std::basic_istream&lt;CharT,Traits&gt;</code> &#30340;&#20844;&#24320;&#25104;&#21592;&#20989;&#25968;)</span></td>
</tr>
<tr class="t-dsc">
<td>
<div class="t-dsc-member-div">
<div><a href="cpp-io-basic_ostream-tellp.html"><span class="t-lines"><span>tellp</span></span></a></div>
</div>
</td>
<td>&#36820;&#22238;&#36755;&#20986;&#20301;&#32622;&#25351;&#31034;&#22120;<br />
<span class="t-mark">(<code>std::basic_ostream&lt;CharT,Traits&gt;</code> &#30340;&#20844;&#24320;&#25104;&#21592;&#20989;&#25968;)</span></td>
</tr>
</table>
</div>
<div class="visualClear"></div>
</div>
</div>
</div>
</body>
</html>