急求!c++中读取文本文件,读取完后想把光标返回开头再读一次,如何做啊

急求!c++中读取文本文件,读取完后想把光标返回开头再读一次,怎么做啊???
大神们,谢谢了
请别说用,seektobegin()和rewind()
for(string s ; getline(in,s) ;len++ ) ;

if(in.eof())
{
cout<<"读文件结束"<<endl ;
//rewind(in) ;
}

我的想法是把读文件的指针在次回到文件的开始位置
谢谢

------解决方案--------------------
in是个什么类型的?
------解决方案--------------------
http://www.cplusplus.com/reference/iostream/istream/seekg/


istream& seekg ( streampos pos ); istream& seekg ( streamoff off, ios_base
:seekdir dir );


value offset is relative to...
ios_base::beg beginning of the stream buffer
ios_base::cur current position in the stream buffer
ios_base::end end of the stream buffer

这些东西自己查查 自己动手 丰衣足食