Set Position with seekg() in C++ File Handling, seekg () is a function in the iostream library that allows you to seek an arbitrary position in a file. It is included in the <fstream> header file and is defined for istream class. It is used in file handling to sets the position of...
ifstream in(fileName.c_str(), ifstream::in | ifstream::binary); if(in) { in.seekg(0,ifstream::end); size = in.tellg(); cout << endl; cout << endl; cout << “*** size stream1*** =” << size << endl; in.seekg(0,ios::end); size = in.tellg(); cout << “*** s...
C++ - Example of delay() function C++ - Print your name randomly C++ - Print maximum possible time using six of nine given single digits C++ - Find last index of a character in a string C++ - Get week day from given date C++ - Set date & time C++ - Reading date & time C++ - Ge...