f.seekg(0, ios::end);是什么意思?
括号里面传递的第一个参数是0,可是第二个参数我就看不明白了,ios应该是个类吧,可是ios::end是什么呢?双冒号的含义在这里是什么?ios::end的类型是什么呢(比...
括号里面传递的第一个参数是0,可是第二个参数我就看不明白了,ios应该是个类吧,可是ios::end是什么呢?双冒号的含义在这里是什么?ios::end的类型是什么呢(比方说int, float...)?
我没有这方面的知识,麻烦大神解释的详细点,感激不尽 展开
我没有这方面的知识,麻烦大神解释的详细点,感激不尽 展开
展开全部
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.//定位到istream的末尾
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.
ios::end 是类istream中的一个枚举值
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.//定位到istream的末尾
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.
ios::end 是类istream中的一个枚举值
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
::作用域, end定义在ios类里面
追问
能说的详细点吗?我的理解函数的参数是要传递一个值,那么end的值是什么(类型是什么)?
追答
end在ios类定义为enum?, const, or 变量? 都有可能.
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询