<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Seek</title>
	<atom:link href="https://www.aitaocui.cn/tag/175054/feed" rel="self" type="application/rss+xml" />
	<link>https://www.aitaocui.cn</link>
	<description>翡翠玉石爱好者聚集地</description>
	<lastBuildDate>Wed, 23 Nov 2022 02:31:27 +0000</lastBuildDate>
	<language>zh-CN</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.1</generator>

<image>
	<url>https://www.aitaocui.cn/wp-content/uploads/2022/11/taocui.png</url>
	<title>Seek</title>
	<link>https://www.aitaocui.cn</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Seek(Open 语句函数)</title>
		<link>https://www.aitaocui.cn/article/277744.html</link>
					<comments>https://www.aitaocui.cn/article/277744.html#respond</comments>
		
		<dc:creator><![CDATA[深蓝空间]]></dc:creator>
		<pubDate>Wed, 23 Nov 2022 02:31:27 +0000</pubDate>
				<category><![CDATA[百科]]></category>
		<category><![CDATA[Seek]]></category>
		<guid isPermaLink="false">https://www.aitaocui.cn/?p=277744</guid>

					<description><![CDATA[Seek 函数 返回一个 Long，在 Open 语句打开的文件中指定当前的读/写位置。语法Seek(filenumber)必要的 filenumber 参数是一个包含有效文件号的...]]></description>
										<content:encoded><![CDATA[</p>
<article>
<p>Seek 函数 返回一个 Long，在 Open 语句打开的文件中指定当前的读/写位置。语法Seek(filenumber)必要的 filenumber 参数是一个包含有效文件号的 Integer。说明Seek 函数返回介于 1 和 2，147，483，647（相当于 2^31 – 1）之间的值。对各种文件访问方式的返回值如下：方式返回值Random下一个读出或写入的 记录号。Binary,Output,Append,Input下一个操作将要发生时所在的字节位置。文件中的第一个字节位于位置 1，第二个字节位于位置 2，依此类推。</p>
</article>
<article>
<h1>基本内容</h1>
<p>Seek 函数 返回一个 Long，在 Open 语句打开的文件中指定当前的读/写位置。语法Seek(filenumber)必要的 filenumber 参数是一个包含有效文件号的 Integer。说明Seek 函数返回介于 1 和 2，147，483，647（相当于 2^31 – 1）之间的值。对各种文件访问方式的返回值如下：方式返回值Random下一个读出或写入的 记录号。Binary,Output,Append,Input下一个操作将要发生时所在的字节位置。文件中的第一个字节位于位置 1，第二个字节位于位置 2，依此类推。</p>
<h1>具体用法</h1>
<p>var</p>
<p>file : InitFile;</p>
<p>Cfile *p;</p>
<p>p=&quot;E:////mytext.txt&quot;;</p>
<p>file.open(p,Cfile::moderead);</p>
<p>char *ch=new char;</p>
<p>long readlen;</p>
<p>readlen=file.read(ch,15);// 读到文件第15个字节,返回的是读到的字节数而不是文件位置</p>
<p>file.seek(2,pos);将 文件指针定位到第17个字节</p>
</p>
</article>
<div class="mt-3 mb-3" style="max-width: 770px;height: auto;">
                                    </div>
<div class="mt-3 mb-3" style="max-width: 770px;height: auto;">
                                    </div>
<div class="mt-3 mb-3" style="max-width: 770px;height: auto;">
                                    </div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.aitaocui.cn/article/277744.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
