SyntaxFix
Write A Post
Hire A Developer
Questions
Like this:
long begin, end; ifstream myfile ("example.txt"); begin = myfile.tellg(); myfile.seekg (0, ios::end); end = myfile.tellg(); myfile.close(); cout << "size: " << (end-begin) << " bytes." << endl;