⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 新建 文本文档.txt

📁 C++课程设计
💻 TXT
字号:
sankt】:
istream::seekg
istream& seekg( streampos pos );

istream& seekg( streamoff off, ios::seek_dir dir );

Parameters

pos

The new position value; streampos is a typedef equivalent to long.

off

The new offset value; streamoff is a typedef equivalent to long.

dir

The seek direction. Must be one of the following enumerators: 

ios::beg   Seek from the beginning of the stream.


ios::cur   Seek from the current position in the stream.


ios::end   Seek from the end of the stream. 
Remarks

Changes the get pointer for the stream. Not all derived classes of istream need support positioning; it is most often used with file-based streams.


【roger_77】:
楼上说的很明白了.
返回的是文件流对象,也就是原来文件流本身那个对象,只是流的指针位置发生了改变.

【flylonginsky】:
还是不大明白....那我如何来应用它返回值呢

【discory】:
流对象的类型把,

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -