#include <iostream>
#include <fstream>
using namespace std;
int main()
{
ifstream file("myfile.txt");
file.seekg(0,ios::end); // points to the end of file
int length = file.tellg(); // returns the end of file's index , if its 0 then the file is empty
}