Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <fstream>
- #include <sstream>
- #include <cstring>
- using namespace std;
- int main () {
- ifstream file1;
- file1.open("test.txt");
- file1.seekg(0);
- cout<<file1.tellg();
- cout<<(char)file1.get();
- cout<<file1.tellg();
- cout<<(char)file1.get();
- cout<<file1.tellg()<<endl;
- file1.seekg(4);
- cout<<(char)file1.get();
- cout<<file1.tellg();
- getchar();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment