Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Home » Tip Bank » C++
Language: C++
Expertise: Intermediate
Jul 31, 2001

Repositioning a std::fstream Pointer


Just like the fseek() function of <stdio.h>, <fstream> classes enable you to position the stream's pointer at an arbitrary location by calling the seekg() member function. For example, you can position it at the file's beginning after you have read from it:
 
#include <fstream>

char c,d;
std::ifstream mystream(
Danny Kalev
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date